Update deprecated functions in SIA (#92737)
update deprecated functions
This commit is contained in:
parent
78fa7fc5da
commit
28efeb9d9e
2 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
hass.data[DOMAIN][entry.entry_id] = hub
|
hass.data[DOMAIN][entry.entry_id] = hub
|
||||||
try:
|
try:
|
||||||
if hub.sia_client:
|
if hub.sia_client:
|
||||||
await hub.sia_client.start(reuse_port=True)
|
await hub.sia_client.async_start(reuse_port=True)
|
||||||
except OSError as exc:
|
except OSError as exc:
|
||||||
raise ConfigEntryNotReady(
|
raise ConfigEntryNotReady(
|
||||||
f"SIA Server at port {entry.data[CONF_PORT]} could not start."
|
f"SIA Server at port {entry.data[CONF_PORT]} could not start."
|
||||||
|
|
|
@ -71,7 +71,7 @@ class SIAHub:
|
||||||
async def async_shutdown(self, _: Event | None = None) -> None:
|
async def async_shutdown(self, _: Event | None = None) -> None:
|
||||||
"""Shutdown the SIA server."""
|
"""Shutdown the SIA server."""
|
||||||
if self.sia_client:
|
if self.sia_client:
|
||||||
await self.sia_client.stop()
|
await self.sia_client.async_stop()
|
||||||
|
|
||||||
async def async_create_and_fire_event(self, event: SIAEvent) -> None:
|
async def async_create_and_fire_event(self, event: SIAEvent) -> None:
|
||||||
"""Create a event on HA dispatcher and then on HA's bus, with the data from the SIAEvent.
|
"""Create a event on HA dispatcher and then on HA's bus, with the data from the SIAEvent.
|
||||||
|
|
Loading…
Add table
Reference in a new issue