Skip to content

Commit

Permalink
powermeter: change faulty test
Browse files Browse the repository at this point in the history
The missing values for energy and power are now also checked.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
  • Loading branch information
hthiery committed Jan 20, 2025
1 parent 2388c5c commit f661bdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions tests/responses/powermeter/device_list_faulty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@
<devicelock>0</devicelock>
</switch>
<powermeter>
<power>0</power>
<energy>0</energy>
<voltage>0</voltage>
</powermeter>
<temperature>
<celsius>285</celsius>
<offset>0</offset>
</temperature>
</device>
</devicelist>
</devicelist>
6 changes: 3 additions & 3 deletions tests/test_fritzhomedevicepowermeter.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_faulty_powermeter_properties(self):
self.fritz.update_devices()
device = self.fritz.get_device_by_ain("08761 0000434")

assert device.energy == 0
assert device.power == 0
assert device.voltage == 0
assert device.energy is None
assert device.power is None
assert device.voltage is None
assert device.current is None

0 comments on commit f661bdd

Please sign in to comment.