1
0
mirror of https://github.com/no2chem/wideq.git synced 2025-05-16 15:20:09 -07:00

Add method for reading light state

This commit is contained in:
Adrian Sampson 2018-04-21 14:59:53 -04:00
parent 426043397d
commit 6d3e7b3fa6
2 changed files with 7 additions and 0 deletions

View File

@ -119,6 +119,7 @@ def ac_config(client, device_id):
print(ac.get_filter_state())
print(ac.get_mfilter_state())
print(ac.get_energy_target())
print(ac.get_light())
EXAMPLE_COMMANDS = {

View File

@ -833,6 +833,12 @@ class ACDevice(Device):
return self._get_config('EnergyDesiredValue')
def get_light(self):
"""Get a Boolean indicating whether the display light is on."""
value = self._get_control('DisplayControl')
return value == '(DisplayControl:0)'
def monitor_start(self):
"""Start monitoring the device's status."""