Event Bus Question

I am wondering how I can see what is on the event bus? I would like to be able to detect when home assistant changes the state of a z-wave device versus when the state of the z-wave device is changed by physically interacting with it.

I was able to create this automation from some example code to detect when a scene is called:

  - id: tv_time_hues
    alias: 'TV Time Hues'
    trigger:
      platform: event
      event_type: call_service
      event_data:
        service_data:
          entity_id: [scene.tv_time]
        domain: scene
        service: turn_on
    action:
      - service: light.turn_on
        data:
          entity_id: light.living_room_hues
          brightness: 64
          color_name: orange
      - delay:
          milliseconds: 50
      - service: light.turn_on
        data:
          entity_id: light.corner_light
          brightness: 255
          color_name: orange

I’d like to do something similar, except I want to detect when home assistant changes the state of a z-wave device. It is a door lock in this case.

The easiest way I have found is to turn on debug in the logger component and watch the homeassistant log. You don’t want to do this for long though, because the file gets very large very quickly, although you should be able to filter effectively once you know what you are looking for.

If you don’t fancy restarting HA every time, you could create an appdaemon app to display all events.

1 Like