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

Expose AC config values I know of so far

This commit is contained in:
Adrian Sampson 2018-04-21 14:42:11 -04:00
parent 0b3730f5f2
commit 597895b263
2 changed files with 24 additions and 0 deletions

View File

@ -114,12 +114,20 @@ def turn(client, device_id, on_off):
ac.set_on(on_off == 'on')
def ac_config(client, device_id):
ac = wideq.ACDevice(client, client.get_device(device_id))
print(ac.get_filter_state())
print(ac.get_mfilter_state())
print(ac.get_energy_target())
EXAMPLE_COMMANDS = {
'ls': ls,
'mon': mon,
'ac-mon': ac_mon,
'set-temp': set_temp,
'turn': turn,
'ac-config': ac_config,
}

View File

@ -805,6 +805,22 @@ class ACDevice(Device):
op_value = self.model.enum_value('Operation', op.value)
self._set_control('Operation', op_value)
def get_filter_state(self):
"""Get information about the filter."""
return self._get_config('Filter')
def get_mfilter_state(self):
"""Get information about the "MFilter" (not sure what this is).
"""
return self._get_config('MFilter')
def get_energy_target(self):
"""Get the configured energy target data."""
return self._get_config('EnergyDesiredValue')
def monitor_start(self):
"""Start monitoring the device's status."""