SNZB-01P No Action Function (N/A)

Hi, my SNZB-01P SONOFF Button has no action function anymore. Is it broken?

image

Did you read the v2.0 breaking changes? https://github.com/Koenkk/zigbee2mqtt/discussions/24198

Your sensor.xxx_action is now called event.xxx

You can go back to the previous method (though not recommended) by enabling the HA legacy options in your z2m config.

Hi, actually no. I think i missed that.

So my automation should now look like this, right?
automation:


    - alias: Respond to button click
      triggers:
          - trigger: state
            entity_id: event.taster_01
            to: ~
      conditions:
          - condition: template
            value_template: "{{trigger.from_state.state != 'unavailable'}}"
          - condition: template
            value_template: "{{trigger.to_state.attributes.event_type == 'single'}}"
      actions:
          - action: light.toggle
            target:
                entity_id: light.schlafzimmer_deckenlicht

But i get the error Message malformed: extra keys not allowed @ data[‘automation’]

Hi, for my button, I use the following template condition. Maybe see if yours should be same for the unavailable test

{{trigger.to_state.attributes.event_type == 'single'}}

There’s some good advice on using the new triggers here: Why and how to avoid device_ids in automations and scripts - #34 by 123