#New Zigbee2MQTT experimental events - how to adjust automations

1 messages · Page 1 of 1 (latest)

keen grove
#

Hi. I am trying to migrate my Zigbee-triggered automations from the legacy mode in Zigbee2MQTT to the new (experimental) events.
I have already done some changes, replaced domain from sensor. to event. and added attribute: event_type and it started to work but because the event_type doesnt change back to Unknown when the button is depressed, it doesnt trigger when the same button is being pressed as previously. Any idea how to fix that please?

https://community.home-assistant.io/t/using-the-new-action-events-in-zigbee2mqtt-2-0/821709/48?u=dinth

#

Here's the actual code:

`alias: Baby buddy buttons
description: ""
triggers:

  • entity_id:
    • event.baby_nappy_changing_button_action
      attribute: event_type
      id: wee
      to: single
      trigger: state
  • entity_id:
    • event.baby_nappy_changing_button_action
      attribute: event_type
      id: poo
      to: hold
      trigger: state
  • entity_id:
    • event.baby_nappy_changing_button_action
      attribute: event_type
      id: both
      to: double
      trigger: state
  • entity_id:
    • event.baby_bedroom_remote_action
      attribute: event_type
      id: bedroom_timer_start
      to: toggle
      trigger: state
  • entity_id:
    • event.baby_bedroom_remote_action
      attribute: event_type
      to: arrow_left_click
      id: bedroom_formula_feeding
      trigger: state
  • entity_id:
    • event.baby_bedroom_remote_action
      attribute: event_type
      to: brightness_up_click
      id: bedroom_nap
      trigger: state
  • entity_id:
    • event.baby_bedroom_remote_action
      attribute: event_type
      to: brightness_down_click
      id: bedroom_sleep
      trigger: state
  • entity_id:
    • event.baby_feeding_remote_action
      attribute: event_type
      to: toggle
      id: feeding_timer_start
      trigger: state
  • entity_id:
    • event.baby_feeding_remote_action
      attribute: event_type
      to: brightness_up_click
      id: feeding_solids
      trigger: state
  • entity_id:
    • event.baby_feeding_remote_action
      attribute: event_type
      to: brightness_down_click
      id: feeding_formula
      trigger: state
      conditions: []`