Created new sensor with specific data and group them by devices(account)

This commit is contained in:
Yordan Suarez
2020-11-01 04:57:10 +00:00
parent 4e4cd3c633
commit 8c644d35f1
9 changed files with 279 additions and 87 deletions

View File

@@ -0,0 +1,15 @@
from .FplSensor import FplSensor
class FplAverageDailySensor(FplSensor):
def __init__(self, hass, config, account):
FplSensor.__init__(self, hass, config, account, "Average Daily")
@property
def state(self):
return self.data["daily_avg"]
@property
def device_state_attributes(self):
"""Return the state attributes."""
return self.attr