move get_time{zone} out from smartdevice + some minor cleanups

This commit is contained in:
Teemu Rytilahti
2022-01-29 20:36:08 +01:00
committed by Teemu R
parent c8ad99abcb
commit f0d66e4195
5 changed files with 35 additions and 46 deletions

View File

@@ -39,6 +39,10 @@ class Emeter(Usage):
"""
return await self.call("erase_emeter_stat")
async def get_realtime(self):
"""Return real-time statistics."""
return await self.call("get_realtime")
async def get_daystat(self, *, year, month, kwh=True):
"""Return daily stats for the given year & month."""
raw_data = await super().get_daystat(year=year, month=month)