Exemplo n.º 1
0
 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
Exemplo n.º 2
0
    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
Exemplo n.º 3
0
    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