def extra_state_attributes(self): """Attributes of the sensor.""" attrs = self.initial_attrs() attrs["physical_status"] = ZonePhysicalStatus( self._element.physical_status).name.lower() attrs["logical_status"] = ZoneLogicalStatus( self._element.logical_status).name.lower() attrs["definition"] = ZoneType(self._element.definition).name.lower() attrs["area"] = self._element.area + 1 attrs["triggered_alarm"] = self._element.triggered_alarm return attrs
def device_state_attributes(self): """Attributes of the sensor.""" from elkm1_lib.const import (ZoneLogicalStatus, ZonePhysicalStatus, ZoneType) attrs = self.initial_attrs() attrs['physical_status'] = ZonePhysicalStatus( self._element.physical_status).name.lower() attrs['logical_status'] = ZoneLogicalStatus( self._element.logical_status).name.lower() attrs['definition'] = ZoneType(self._element.definition).name.lower() attrs['area'] = self._element.area + 1 attrs['bypassed'] = self._element.bypassed attrs['triggered_alarm'] = self._element.triggered_alarm return attrs
def device_state_attributes(self): """Attributes of the sensor.""" from elkm1_lib.const import ZoneLogicalStatus, ZonePhysicalStatus, ZoneType attrs = self.initial_attrs() attrs["physical_status"] = ZonePhysicalStatus( self._element.physical_status ).name.lower() attrs["logical_status"] = ZoneLogicalStatus( self._element.logical_status ).name.lower() attrs["definition"] = ZoneType(self._element.definition).name.lower() attrs["area"] = self._element.area + 1 attrs["bypassed"] = self._element.bypassed attrs["triggered_alarm"] = self._element.triggered_alarm return attrs