fixed 'on_startup() takes 0 positional arguments but 1 was given' (#17295)

This commit is contained in:
Paul Annekov 2018-10-10 15:24:30 +03:00 committed by Paulus Schoutsen
parent 40e0966d7f
commit 052c094425

View File

@ -106,7 +106,7 @@ class MiFloraSensor(Entity):
async def async_added_to_hass(self):
"""Set initial state."""
@callback
def on_startup():
def on_startup(_):
self.async_schedule_update_ha_state(True)
self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_START, on_startup)