예제 #1
0
 def parse_data(self, device, raw_data):
     AjaxDevice.parse_data(self, device, raw_data)
     self._in_use = device["active"]
     self._load_power = device["current"]
     self._power_consumed = device["powerConsumed"]
     self._voltage = device["voltage"]
     self.async_schedule_update_ha_state()
예제 #2
0
 def parse_data(self, device, raw_data):
     AjaxDevice.parse_data(self, device, raw_data)
     self._motion = device["motionPresent"]
     self.async_schedule_update_ha_state()
예제 #3
0
 def parse_data(self, device, raw_data):
     AjaxDevice.parse_data(self, device, raw_data)
     self._closed = device["reedClosed"]
     self.async_schedule_update_ha_state()
예제 #4
0
 def parse_data(self, device, raw_data):
     AjaxDevice.parse_data(self, device, raw_data)
     self._leak = device["leakDetected"]
     self.async_schedule_update_ha_state()
예제 #5
0
 def device_state_attributes(self):
     return AjaxDevice.get_attributes(self)
예제 #6
0
 def __init__(self, device, ajax_hub, device_class):
     AjaxDevice.__init__(self, device, ajax_hub)
     self._device_class = device_class
예제 #7
0
    def parse_data(self, device, raw_data):
        AjaxDevice.parse_data(self, device, raw_data)
        self._smoke_alarm = device["smokeAlarm"]

        self.async_schedule_update_ha_state()
예제 #8
0
 def __init__(self, device, ajax_hub):
     AjaxDevice.__init__(self, device, ajax_hub)
     self._in_use = device["active"]
     self._load_power = device["current"]
     self._power_consumed = device["powerConsumed"]
     self._voltage = device["voltage"]