'Update device state, if event was not queued.'

def _on_up_down(self, channel, click_type, was_queued, time_diff):

    import pyflic
    if (was_queued and self._queued_event_check(click_type, time_diff)):
        return
    self._is_down = (click_type == pyflic.ClickType.ButtonDown)
    self.schedule_update_ha_state()
