Small fixes in SIA (#51401)

* fixes from comment in #51206

* reverted name to async_
pull/51454/head
Eduard van Valkenburg 2021-06-04 02:43:15 +02:00 committed by GitHub
parent bf3a561149
commit 07d6186fea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -72,7 +72,7 @@ async def async_setup_entry(
)
class SIAAlarmControlPanel(AlarmControlPanelEntity, SIABaseEntity):
class SIAAlarmControlPanel(SIABaseEntity, AlarmControlPanelEntity):
"""Class for SIA Alarm Control Panels."""
def __init__(

View File

@ -73,7 +73,7 @@ async def async_setup_entry(
async_add_entities(generate_binary_sensors(entry))
class SIABinarySensorBase(BinarySensorEntity, SIABaseEntity):
class SIABinarySensorBase(SIABaseEntity, BinarySensorEntity):
"""Class for SIA Binary Sensors."""
def __init__(

View File

@ -81,7 +81,8 @@ class SIABaseEntity(RestoreEntity):
if self._cancel_availability_cb:
self._cancel_availability_cb()
async def async_handle_event(self, sia_event: SIAEvent) -> None:
@callback
def async_handle_event(self, sia_event: SIAEvent) -> None:
"""Listen to dispatcher events for this port and account and update state and attributes.
If the port and account combo receives any message it means it is online and can therefore be set to available.