Skip to content

Commit

Permalink
sync on start
Browse files Browse the repository at this point in the history
  • Loading branch information
dgomes committed Dec 28, 2020
1 parent 9879d5c commit df41782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/erse/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def __init__(self, name, config):

async def async_added_to_hass(self):
"""Setups all required entities and automations."""
self._state = self.my_plan.current_tariff(dt_util.now())
async_track_time_change(self.hass, self.timer_update, minute=range(0, 60, 15))
await self.timer_update(dt_util.now())

@callback
async def timer_update(self, now):
Expand Down

0 comments on commit df41782

Please sign in to comment.