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

Merge pull request #77 from dacrypt/master

add power readings to ac_config
This commit is contained in:
Adrian Sampson 2020-01-22 12:57:33 -05:00 committed by GitHub
commit acc8603c9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
.tox
dist/
wideq_state.json
__pycache__

View File

@ -146,6 +146,8 @@ def ac_config(client, device_id):
print(ac.get_filter_state())
print(ac.get_mfilter_state())
print(ac.get_energy_target())
print(ac.get_power(), " watts")
print(ac.get_outdoor_power(), " watts")
print(ac.get_volume())
print(ac.get_light())
print(ac.get_zones())

View File

@ -249,6 +249,18 @@ class ACDevice(Device):
return self._get_config('EnergyDesiredValue')
def get_outdoor_power(self):
"""Get instant power usage in watts of the outdoor unit"""
value = self._get_config('OutTotalInstantPower')
return value['OutTotalInstantPower']
def get_power(self):
"""Get the instant power usage in watts of the whole unit"""
value = self._get_config('InOutInstantPower')
return value['InOutInstantPower']
def get_light(self):
"""Get a Boolean indicating whether the display light is on."""