Skip to content

Commit a75646d

Browse files
authored
2 parents 7aa6c8b + 25d1480 commit a75646d

File tree

32 files changed

+121
-105
lines changed

32 files changed

+121
-105
lines changed

homeassistant/components/alexa_devices/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"iot_class": "cloud_polling",
99
"loggers": ["aioamazondevices"],
1010
"quality_scale": "bronze",
11-
"requirements": ["aioamazondevices==3.0.6"]
11+
"requirements": ["aioamazondevices==3.1.2"]
1212
}

homeassistant/components/alexa_devices/notify.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from typing import Any, Final
88

99
from aioamazondevices.api import AmazonDevice, AmazonEchoApi
10+
from aioamazondevices.const import SPEAKER_GROUP_FAMILY
1011

1112
from homeassistant.components.notify import NotifyEntity, NotifyEntityDescription
1213
from homeassistant.core import HomeAssistant
@@ -22,6 +23,7 @@
2223
class AmazonNotifyEntityDescription(NotifyEntityDescription):
2324
"""Alexa Devices notify entity description."""
2425

26+
is_supported: Callable[[AmazonDevice], bool] = lambda _device: True
2527
method: Callable[[AmazonEchoApi, AmazonDevice, str], Awaitable[None]]
2628
subkey: str
2729

@@ -31,6 +33,7 @@ class AmazonNotifyEntityDescription(NotifyEntityDescription):
3133
key="speak",
3234
translation_key="speak",
3335
subkey="AUDIO_PLAYER",
36+
is_supported=lambda _device: _device.device_family != SPEAKER_GROUP_FAMILY,
3437
method=lambda api, device, message: api.call_alexa_speak(device, message),
3538
),
3639
AmazonNotifyEntityDescription(
@@ -58,6 +61,7 @@ async def async_setup_entry(
5861
for sensor_desc in NOTIFY
5962
for serial_num in coordinator.data
6063
if sensor_desc.subkey in coordinator.data[serial_num].capabilities
64+
and sensor_desc.is_supported(coordinator.data[serial_num])
6165
)
6266

6367

homeassistant/components/aruba/device_tracker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _update_info(self) -> bool:
8989
def get_aruba_data(self) -> dict[str, dict[str, str]] | None:
9090
"""Retrieve data from Aruba Access Point and return parsed result."""
9191

92-
connect = f"ssh {self.username}@{self.host} -o HostKeyAlgorithms=ssh-rsa"
92+
connect = f"ssh {self.username}@{self.host}"
9393
ssh: pexpect.spawn[str] = pexpect.spawn(connect, encoding="utf-8")
9494
query = ssh.expect(
9595
[

homeassistant/components/dnsip/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
"config_flow": true,
66
"documentation": "https://www.home-assistant.io/integrations/dnsip",
77
"iot_class": "cloud_polling",
8-
"requirements": ["aiodns==3.4.0"]
8+
"requirements": ["aiodns==3.5.0"]
99
}

homeassistant/components/frontend/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
"documentation": "https://www.home-assistant.io/integrations/frontend",
2121
"integration_type": "system",
2222
"quality_scale": "internal",
23-
"requirements": ["home-assistant-frontend==20250531.2"]
23+
"requirements": ["home-assistant-frontend==20250531.3"]
2424
}

homeassistant/components/homematicip_cloud/hap.py

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ async def async_setup(self, tries: int = 0) -> bool:
128128
self.config_entry.data.get(HMIPC_AUTHTOKEN),
129129
self.config_entry.data.get(HMIPC_NAME),
130130
)
131+
131132
except HmipcConnectionError as err:
132133
raise ConfigEntryNotReady from err
133134
except Exception as err: # noqa: BLE001
@@ -210,41 +211,13 @@ def update_all(self) -> None:
210211
for device in self.home.devices:
211212
device.fire_update_event()
212213

213-
async def async_connect(self) -> None:
214-
"""Start WebSocket connection."""
215-
tries = 0
216-
while True:
217-
retry_delay = 2 ** min(tries, 8)
218-
219-
try:
220-
await self.home.get_current_state_async()
221-
hmip_events = self.home.enable_events()
222-
self.home.set_on_connected_handler(self.ws_connected_handler)
223-
self.home.set_on_disconnected_handler(self.ws_disconnected_handler)
224-
tries = 0
225-
await hmip_events
226-
except HmipConnectionError:
227-
_LOGGER.error(
228-
(
229-
"Error connecting to HomematicIP with HAP %s. "
230-
"Retrying in %d seconds"
231-
),
232-
self.config_entry.unique_id,
233-
retry_delay,
234-
)
235-
236-
if self._ws_close_requested:
237-
break
238-
self._ws_close_requested = False
239-
tries += 1
240-
241-
try:
242-
self._retry_task = self.hass.async_create_task(
243-
asyncio.sleep(retry_delay)
244-
)
245-
await self._retry_task
246-
except asyncio.CancelledError:
247-
break
214+
async def async_connect(self, home: AsyncHome) -> None:
215+
"""Connect to HomematicIP Cloud Websocket."""
216+
await home.enable_events()
217+
218+
home.set_on_connected_handler(self.ws_connected_handler)
219+
home.set_on_disconnected_handler(self.ws_disconnected_handler)
220+
home.set_on_reconnect_handler(self.ws_reconnected_handler)
248221

249222
async def async_reset(self) -> bool:
250223
"""Close the websocket connection."""
@@ -272,14 +245,22 @@ def shutdown(self, event) -> None:
272245

273246
async def ws_connected_handler(self) -> None:
274247
"""Handle websocket connected."""
275-
_LOGGER.debug("WebSocket connection to HomematicIP established")
248+
_LOGGER.info("Websocket connection to HomematicIP Cloud established")
276249
if self._ws_connection_closed.is_set():
277250
await self.get_state()
278251
self._ws_connection_closed.clear()
279252

280253
async def ws_disconnected_handler(self) -> None:
281254
"""Handle websocket disconnection."""
282-
_LOGGER.warning("WebSocket connection to HomematicIP closed")
255+
_LOGGER.warning("Websocket connection to HomematicIP Cloud closed")
256+
self._ws_connection_closed.set()
257+
258+
async def ws_reconnected_handler(self, reason: str) -> None:
259+
"""Handle websocket reconnection."""
260+
_LOGGER.info(
261+
"Websocket connection to HomematicIP Cloud re-established due to reason: %s",
262+
reason,
263+
)
283264
self._ws_connection_closed.set()
284265

285266
async def get_hap(
@@ -306,6 +287,6 @@ async def get_hap(
306287
home.on_update(self.async_update)
307288
home.on_create(self.async_create_entity)
308289

309-
hass.loop.create_task(self.async_connect())
290+
await self.async_connect(home)
310291

311292
return home

homeassistant/components/homematicip_cloud/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"documentation": "https://www.home-assistant.io/integrations/homematicip_cloud",
77
"iot_class": "cloud_push",
88
"loggers": ["homematicip"],
9-
"requirements": ["homematicip==2.0.4"]
9+
"requirements": ["homematicip==2.0.5"]
1010
}

homeassistant/components/jewish_calendar/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
"documentation": "https://www.home-assistant.io/integrations/jewish_calendar",
77
"iot_class": "calculated",
88
"loggers": ["hdate"],
9-
"requirements": ["hdate[astral]==1.1.1"],
9+
"requirements": ["hdate[astral]==1.1.2"],
1010
"single_config_entry": true
1111
}

homeassistant/components/jewish_calendar/sensor.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class JewishCalendarTimestampSensorDescription(JewishCalendarBaseSensorDescripti
7373
translation_key="weekly_portion",
7474
device_class=SensorDeviceClass.ENUM,
7575
options_fn=lambda _: [str(p) for p in Parasha],
76-
value_fn=lambda results: str(results.after_tzais_date.upcoming_shabbat.parasha),
76+
value_fn=lambda results: results.after_tzais_date.upcoming_shabbat.parasha,
7777
),
7878
JewishCalendarSensorDescription(
7979
key="holiday",
@@ -98,17 +98,13 @@ class JewishCalendarTimestampSensorDescription(JewishCalendarBaseSensorDescripti
9898
key="omer_count",
9999
translation_key="omer_count",
100100
entity_registry_enabled_default=False,
101-
value_fn=lambda results: (
102-
results.after_shkia_date.omer.total_days
103-
if results.after_shkia_date.omer
104-
else 0
105-
),
101+
value_fn=lambda results: results.after_shkia_date.omer.total_days,
106102
),
107103
JewishCalendarSensorDescription(
108104
key="daf_yomi",
109105
translation_key="daf_yomi",
110106
entity_registry_enabled_default=False,
111-
value_fn=lambda results: str(results.daytime_date.daf_yomi),
107+
value_fn=lambda results: results.daytime_date.daf_yomi,
112108
),
113109
)
114110

homeassistant/components/lifx/manager.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import asyncio
66
from collections.abc import Callable
77
from datetime import timedelta
8-
from typing import Any
8+
from typing import TYPE_CHECKING, Any
99

1010
import aiolifx_effects
1111
from aiolifx_themes.painter import ThemePainter
@@ -31,9 +31,12 @@
3131
from homeassistant.helpers.service import async_extract_referenced_entity_ids
3232

3333
from .const import _ATTR_COLOR_TEMP, ATTR_THEME, DATA_LIFX_MANAGER, DOMAIN
34-
from .coordinator import LIFXUpdateCoordinator, Light
34+
from .coordinator import LIFXUpdateCoordinator
3535
from .util import convert_8_to_16, find_hsbk
3636

37+
if TYPE_CHECKING:
38+
from aiolifx.aiolifx import Light
39+
3740
SCAN_INTERVAL = timedelta(seconds=10)
3841

3942
SERVICE_EFFECT_COLORLOOP = "effect_colorloop"
@@ -426,8 +429,8 @@ async def _start_effect_sky(
426429
) -> None:
427430
"""Start the firmware-based Sky effect."""
428431
palette = kwargs.get(ATTR_PALETTE)
432+
theme = Theme()
429433
if palette is not None:
430-
theme = Theme()
431434
for hsbk in palette:
432435
theme.add_hsbk(hsbk[0], hsbk[1], hsbk[2], hsbk[3])
433436

0 commit comments

Comments
 (0)