Update deprecated functions in SIA (#92737)

update deprecated functions
This commit is contained in:
Eduard van Valkenburg 2023-05-07 16:47:02 +02:00 committed by GitHub
parent 78fa7fc5da
commit 28efeb9d9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
hass.data[DOMAIN][entry.entry_id] = hub
try:
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:
raise ConfigEntryNotReady(
f"SIA Server at port {entry.data[CONF_PORT]} could not start."

View file

@ -71,7 +71,7 @@ class SIAHub:
async def async_shutdown(self, _: Event | None = None) -> None:
"""Shutdown the SIA server."""
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:
"""Create a event on HA dispatcher and then on HA's bus, with the data from the SIAEvent.