From 07d6186feab534d05ef88ad7c7b68e98fd751584 Mon Sep 17 00:00:00 2001 From: Eduard van Valkenburg Date: Fri, 4 Jun 2021 02:43:15 +0200 Subject: [PATCH] Small fixes in SIA (#51401) * fixes from comment in #51206 * reverted name to async_ --- homeassistant/components/sia/alarm_control_panel.py | 2 +- homeassistant/components/sia/binary_sensor.py | 2 +- homeassistant/components/sia/sia_entity_base.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/sia/alarm_control_panel.py b/homeassistant/components/sia/alarm_control_panel.py index 19ad4f4472e..5a6a4f6f55c 100644 --- a/homeassistant/components/sia/alarm_control_panel.py +++ b/homeassistant/components/sia/alarm_control_panel.py @@ -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__( diff --git a/homeassistant/components/sia/binary_sensor.py b/homeassistant/components/sia/binary_sensor.py index f9cfca778e3..eec4f9b2717 100644 --- a/homeassistant/components/sia/binary_sensor.py +++ b/homeassistant/components/sia/binary_sensor.py @@ -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__( diff --git a/homeassistant/components/sia/sia_entity_base.py b/homeassistant/components/sia/sia_entity_base.py index 9d81b749afe..5169702e67b 100644 --- a/homeassistant/components/sia/sia_entity_base.py +++ b/homeassistant/components/sia/sia_entity_base.py @@ -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.