'Maybe schedule state update.
If value changed after device was created but before setup_platform
was called - skip updating state.'

def maybe_schedule_update(self):

    if (self.hass and (not self._update_scheduled)):
        self.hass.add_job(self._schedule_update)
