Adding received and delivered KWH readings.
This commit is contained in:
@@ -310,6 +310,8 @@ class FplApi(object):
|
|||||||
data["projectedKWH"] = r["CurrentUsage"]["projectedKWH"]
|
data["projectedKWH"] = r["CurrentUsage"]["projectedKWH"]
|
||||||
data["dailyAverageKWH"] = r["CurrentUsage"]["dailyAverageKWH"]
|
data["dailyAverageKWH"] = r["CurrentUsage"]["dailyAverageKWH"]
|
||||||
data["billToDateKWH"] = r["CurrentUsage"]["billToDateKWH"]
|
data["billToDateKWH"] = r["CurrentUsage"]["billToDateKWH"]
|
||||||
|
data["recMtrReading"] = r["CurrentUsage"]["recMtrReading"]
|
||||||
|
data["delMtrReading"] = r["CurrentUsage"]["delMtrReading"]
|
||||||
return data
|
return data
|
||||||
|
|
||||||
async def __getDataFromApplianceUsage(self, account, lastBilledDate) -> dict:
|
async def __getDataFromApplianceUsage(self, account, lastBilledDate) -> dict:
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ from .sensor_KWHSensor import (
|
|||||||
ProjectedKWHSensor,
|
ProjectedKWHSensor,
|
||||||
DailyAverageKWHSensor,
|
DailyAverageKWHSensor,
|
||||||
BillToDateKWHSensor,
|
BillToDateKWHSensor,
|
||||||
|
NetReceivedKWHSensor,
|
||||||
|
NetDeliveredKWHSensor,
|
||||||
)
|
)
|
||||||
from .sensor_DatesSensor import (
|
from .sensor_DatesSensor import (
|
||||||
CurrentBillDateSensor,
|
CurrentBillDateSensor,
|
||||||
|
|||||||
@@ -38,3 +38,27 @@ class BillToDateKWHSensor(FplEntity):
|
|||||||
@property
|
@property
|
||||||
def icon(self):
|
def icon(self):
|
||||||
return "mdi:flash"
|
return "mdi:flash"
|
||||||
|
|
||||||
|
class NetReceivedKWHSensor(FplEntity):
|
||||||
|
def __init__(self, coordinator, config, account):
|
||||||
|
super().__init__(coordinator, config, account, "Received Meter Reading KWH")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def state(self):
|
||||||
|
return self.getData("recMtrReading")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def icon(self):
|
||||||
|
return "mdi:flash"
|
||||||
|
|
||||||
|
class NetDeliveredKWHSensor(FplEntity):
|
||||||
|
def __init__(self, coordinator, config, account):
|
||||||
|
super().__init__(coordinator, config, account, "Delivered Meter Reading KWH")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def state(self):
|
||||||
|
return self.getData("delMtrReading")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def icon(self):
|
||||||
|
return "mdi:flash"
|
||||||
|
|||||||
Reference in New Issue
Block a user