Example #1
0
def events(hass):
    """Yield caught homekit_changed events."""
    events = []
    hass.bus.async_listen(
        EVENT_HOMEKIT_CHANGED, ha_callback(lambda e: events.append(e))
    )
    yield events
Example #2
0
def events(hass):
    """Yield caught homekit_changed events."""
    events = []
    hass.bus.async_listen(
        EVENT_HOMEKIT_CHANGED,
        ha_callback(lambda e: events.append(e)))
    yield events
Example #3
0
def events(hass):
    """Yield caught shelly_click events."""
    ha_events = []
    hass.bus.async_listen(EVENT_SHELLY_CLICK, ha_callback(ha_events.append))
    yield ha_events