bug fixes
This commit is contained in:
40
custom_components/fpl/sensor_KWHSensor.py
Normal file
40
custom_components/fpl/sensor_KWHSensor.py
Normal file
@@ -0,0 +1,40 @@
|
||||
from .fplEntity import FplEntity
|
||||
|
||||
|
||||
class ProjectedKWHSensor(FplEntity):
|
||||
def __init__(self, coordinator, config, account):
|
||||
super().__init__(coordinator, config, account, "Projected KWH")
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
return self.getData("projectedKWH")
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
return "mdi:flash"
|
||||
|
||||
|
||||
class DailyAverageKWHSensor(FplEntity):
|
||||
def __init__(self, coordinator, config, account):
|
||||
super().__init__(coordinator, config, account, "Daily Average KWH")
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
return self.getData("dailyAverageKWH")
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
return "mdi:flash"
|
||||
|
||||
|
||||
class BillToDateKWHSensor(FplEntity):
|
||||
def __init__(self, coordinator, config, account):
|
||||
super().__init__(coordinator, config, account, "Bill To Date KWH")
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
return self.getData("billToDateKWH")
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
return "mdi:flash"
|
||||
Reference in New Issue
Block a user