diff --git a/example.py b/example.py index 21c10c0..112beb7 100644 --- a/example.py +++ b/example.py @@ -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 = { diff --git a/wideq.py b/wideq.py index 8ff5d24..0440b5c 100644 --- a/wideq.py +++ b/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."""