Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions homeassistant/components/climate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@

CONVERTIBLE_ATTRIBUTE = [ATTR_TEMPERATURE, ATTR_TARGET_TEMP_LOW, ATTR_TARGET_TEMP_HIGH]

# Can be removed in 2025.1 after deprecation period of the new feature flags
CHECK_TURN_ON_OFF_FEATURE_FLAG = (
ClimateEntityFeature.TURN_ON | ClimateEntityFeature.TURN_OFF
)

SET_TEMPERATURE_SCHEMA = vol.All(
cv.has_at_least_one_key(
ATTR_TEMPERATURE, ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class DevoloScannerEntity( # pylint: disable=hass-enforce-class-module
):
"""Representation of a devolo device tracker."""

_attr_has_entity_name = True
_attr_translation_key = "device_tracker"

def __init__(
Expand All @@ -99,6 +100,7 @@ def __init__(
super().__init__(coordinator)
self._device = device
self._attr_mac_address = mac
self._attr_name = mac

@property
def extra_state_attributes(self) -> dict[str, str]:
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/home_connect/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"documentation": "https://www.home-assistant.io/integrations/home_connect",
"iot_class": "cloud_push",
"loggers": ["aiohomeconnect"],
"requirements": ["aiohomeconnect==0.17.1"],
"quality_scale": "platinum",
"requirements": ["aiohomeconnect==0.18.0"],
"zeroconf": ["_homeconnect._tcp.local."]
}
2 changes: 1 addition & 1 deletion homeassistant/components/lamarzocco/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
"iot_class": "cloud_push",
"loggers": ["pylamarzocco"],
"quality_scale": "platinum",
"requirements": ["pylamarzocco==2.0.8"]
"requirements": ["pylamarzocco==2.0.9"]
}
6 changes: 5 additions & 1 deletion homeassistant/components/lamarzocco/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ class LaMarzoccoNumberEntityDescription(
CoffeeBoiler, machine.dashboard.config[WidgetType.CM_COFFEE_BOILER]
).target_temperature
),
available_fn=(
lambda coordinator: WidgetType.CM_COFFEE_BOILER
in coordinator.device.dashboard.config
),
),
LaMarzoccoNumberEntityDescription(
key="smart_standby_time",
Expand Down Expand Up @@ -221,7 +225,7 @@ class LaMarzoccoNumberEntity(LaMarzoccoEntity, NumberEntity):
entity_description: LaMarzoccoNumberEntityDescription

@property
def native_value(self) -> float:
def native_value(self) -> float | int:
"""Return the current value."""
return self.entity_description.native_value_fn(self.coordinator.device)

Expand Down
4 changes: 4 additions & 0 deletions homeassistant/components/lamarzocco/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ class LaMarzoccoSensorEntityDescription(
).ready_start_time
),
entity_category=EntityCategory.DIAGNOSTIC,
available_fn=(
lambda coordinator: WidgetType.CM_COFFEE_BOILER
in coordinator.device.dashboard.config
),
),
LaMarzoccoSensorEntityDescription(
key="steam_boiler_ready_time",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/onedrive/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def _async_update_data(self) -> Drive:
translation_domain=DOMAIN, translation_key="authentication_failed"
) from err
except OneDriveException as err:
_LOGGER.debug("Failed to fetch drive data: %s")
_LOGGER.debug("Failed to fetch drive data: %s", err, exc_info=True)
raise UpdateFailed(
translation_domain=DOMAIN, translation_key="update_failed"
) from err
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/zha/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"zha",
"universal_silabs_flasher"
],
"requirements": ["zha==0.0.59"],
"requirements": ["zha==0.0.60"],
"usb": [
{
"vid": "10C4",
Expand Down
6 changes: 3 additions & 3 deletions requirements_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions requirements_test_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion script/hassfest/quality_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,6 @@ class Rule:
"hko",
"hlk_sw16",
"holiday",
"home_connect",
"homekit",
"homekit_controller",
"homematic",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
StateSnapshot({
'attributes': ReadOnlyDict({
'band': '5 GHz',
'friendly_name': 'AA:BB:CC:DD:EE:FF',
'mac': 'AA:BB:CC:DD:EE:FF',
'source_type': <SourceType.ROUTER: 'router'>,
'wifi': 'Main',
}),
'context': <ANY>,
'entity_id': 'device_tracker.devolo_home_network_1234567890_aa_bb_cc_dd_ee_ff',
'entity_id': 'device_tracker.aa_bb_cc_dd_ee_ff',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
Expand Down
13 changes: 4 additions & 9 deletions tests/components/devolo_home_network/test_device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
from homeassistant.helpers import entity_registry as er

from . import configure_integration
from .const import CONNECTED_STATIONS, DISCOVERY_INFO, NO_CONNECTED_STATIONS
from .const import CONNECTED_STATIONS, NO_CONNECTED_STATIONS
from .mock import MockDevice

from tests.common import async_fire_time_changed

STATION = CONNECTED_STATIONS[0]
SERIAL = DISCOVERY_INFO.properties["SN"]


@pytest.mark.usefixtures("entity_registry_enabled_by_default")
Expand All @@ -35,9 +34,7 @@ async def test_device_tracker(
snapshot: SnapshotAssertion,
) -> None:
"""Test device tracker states."""
state_key = (
f"{PLATFORM}.{DOMAIN}_{SERIAL}_{STATION.mac_address.lower().replace(':', '_')}"
)
state_key = f"{PLATFORM}.{STATION.mac_address.lower().replace(':', '_')}"
entry = configure_integration(hass)
await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
Expand Down Expand Up @@ -77,14 +74,12 @@ async def test_restoring_clients(
entity_registry: er.EntityRegistry,
) -> None:
"""Test restoring existing device_tracker entities."""
state_key = (
f"{PLATFORM}.{DOMAIN}_{SERIAL}_{STATION.mac_address.lower().replace(':', '_')}"
)
state_key = f"{PLATFORM}.{STATION.mac_address.lower().replace(':', '_')}"
entry = configure_integration(hass)
entity_registry.async_get_or_create(
PLATFORM,
DOMAIN,
f"{SERIAL}_{STATION.mac_address}",
f"{STATION.mac_address}",
config_entry=entry,
)

Expand Down
4 changes: 4 additions & 0 deletions tests/components/reolink/test_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ async def test_webhook_callback(
reolink_connect.motion_detected.return_value = True
reolink_connect.ONVIF_event_callback.return_value = None
await client.post(f"/api/webhook/{webhook_id}")
await hass.async_block_till_done()
signal_all.assert_called_once()
assert hass.states.get(entity_id).state == STATE_ON

Expand All @@ -129,6 +130,7 @@ async def test_webhook_callback(
signal_all.reset_mock()
reolink_connect.get_motion_state_all_ch.return_value = False
await client.post(f"/api/webhook/{webhook_id}")
await hass.async_block_till_done()
signal_all.assert_not_called()

assert hass.states.get(entity_id).state == STATE_ON
Expand All @@ -137,13 +139,15 @@ async def test_webhook_callback(
reolink_connect.motion_detected.return_value = False
reolink_connect.ONVIF_event_callback.return_value = [0]
await client.post(f"/api/webhook/{webhook_id}", data="test_data")
await hass.async_block_till_done()
signal_ch.assert_called_once()
assert hass.states.get(entity_id).state == STATE_OFF

# test webhook callback single channel with error in event callback
signal_ch.reset_mock()
reolink_connect.ONVIF_event_callback.side_effect = Exception("Test error")
await client.post(f"/api/webhook/{webhook_id}", data="test_data")
await hass.async_block_till_done()
signal_ch.assert_not_called()

# test failure to read date from webhook post
Expand Down
Loading