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.