Add voltage and current monitoring to smart Devices (#1281)

This commit is contained in:
Ryan Nitcher
2024-11-20 11:18:30 -07:00
committed by GitHub
parent 59b047f485
commit dab64e5d48
3 changed files with 36 additions and 5 deletions

View File

@@ -211,5 +211,8 @@ async def test_supported(dev: Device):
assert energy_module.supports(Energy.ModuleFeature.PERIODIC_STATS) is True
else:
assert energy_module.supports(Energy.ModuleFeature.CONSUMPTION_TOTAL) is False
assert energy_module.supports(Energy.ModuleFeature.VOLTAGE_CURRENT) is False
assert energy_module.supports(Energy.ModuleFeature.PERIODIC_STATS) is False
if energy_module.supported_version < 2:
assert energy_module.supports(Energy.ModuleFeature.VOLTAGE_CURRENT) is False
else:
assert energy_module.supports(Energy.ModuleFeature.VOLTAGE_CURRENT) is True