mirror of
https://github.com/no2chem/wideq.git
synced 2025-05-16 07:10:09 -07:00
Add method for reading light state
This commit is contained in:
parent
426043397d
commit
6d3e7b3fa6
@ -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 = {
|
||||
|
6
wideq.py
6
wideq.py
@ -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."""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user