Merge remote-tracking branch 'origin/master'

This commit is contained in:
Yordan Suarez
2022-01-22 23:00:41 -05:00
14 changed files with 567 additions and 63 deletions

View File

@@ -13,8 +13,27 @@ class FplAverageDailySensor(FplMoneyEntity):
if budget == True and budget_billing_projected_bill is not None:
return self.getData("budget_billing_daily_avg")
return self.getData("daily_avg")
try:
self._state=self.getData("daily_avg")
except:
pass
return self._state
<<<<<<< HEAD
=======
@property
def icon(self):
return "mdi:currency-usd"
def defineAttributes(self):
"""Return the state attributes."""
attributes = {}
attributes["friendly_name"] = "Daily Average"
attributes["device_class"] = "monetary"
attributes["state_class"] = "total"
attributes["unit_of_measurement"] = "$"
return attributes
>>>>>>> master
class BudgetDailyAverageSensor(FplMoneyEntity):
def __init__(self, coordinator, config, account):
@@ -22,8 +41,13 @@ class BudgetDailyAverageSensor(FplMoneyEntity):
@property
def state(self):
return self.getData("budget_billing_daily_avg")
try:
self._state= self.getData("budget_billing_daily_avg")
except:
pass
return self._state
<<<<<<< HEAD
class ActualDailyAverageSensor(FplMoneyEntity):
def __init__(self, coordinator, config, account):
@@ -32,3 +56,18 @@ class ActualDailyAverageSensor(FplMoneyEntity):
@property
def state(self):
return self.getData("daily_avg")
=======
@property
def icon(self):
return "mdi:currency-usd"
def defineAttributes(self):
"""Return the state attributes."""
attributes = {}
attributes["friendly_name"] = "Budget Daily Average"
attributes["device_class"] = "monitary"
attributes["state_class"] = "total"
attributes["unit_of_measurement"] = "$"
return attributes
>>>>>>> master