-
-
Save jwhb/90c79430d6a6e6f31262bca1e39aca9c to your computer and use it in GitHub Desktop.
blueprint: | |
name: Zigbee2MQTT - IKEA E1524/E1810 Tradfri Remote Control | |
description: Control anything using "IKEA E1524/E1810 Tradfri Remote Control" | |
domain: automation | |
input: | |
action_sensor: | |
name: Remote | |
description: Zigbee2MQTT action sensor | |
selector: | |
entity: | |
integration: mqtt | |
domain: sensor | |
multiple: false | |
toggle_action: | |
name: Toggle Action | |
default: [] | |
selector: | |
action: {} | |
arrow_right_action: | |
name: Arrow Right Action | |
default: [] | |
selector: | |
action: {} | |
arrow_left_action: | |
name: Arrow Left Action | |
default: [] | |
selector: | |
action: {} | |
brightness_up_action: | |
name: Brightness Up Action | |
default: [] | |
selector: | |
action: {} | |
brightness_down_action: | |
name: Brightness Down Action | |
default: [] | |
selector: | |
action: {} | |
source_url: https://community.home-assistant.io/t/zigbee2mqtt-ikea-e1810-tradfri-remote-control/308820 | |
mode: restart | |
max_exceeded: silent | |
trigger: | |
platform: state | |
entity_id: !input action_sensor | |
action: | |
- variables: | |
command: '{{ trigger.to_state.state }}' | |
- choose: | |
- conditions: '{{ command == ''toggle'' }}' | |
sequence: !input toggle_action | |
- conditions: '{{ command == ''arrow_right_click'' }}' | |
sequence: !input arrow_right_action | |
- conditions: '{{ command == ''arrow_left_click'' }}' | |
sequence: !input arrow_left_action | |
- conditions: '{{ command == ''brightness_up_click'' }}' | |
sequence: !input brightness_up_action | |
- conditions: '{{ command == ''brightness_down_click'' }}' | |
sequence: !input brightness_down_action |
Recently, Z2M developer announced this: Koenkk/zigbee2mqtt#24198
This breaks your blueprint, to make it work again we need to add:
homeassistant:
legacy_action_sensor: true
To the Home Assistant tab in Z2M config.
They say, now we should start using event based actions.
https://www.reddit.com/r/homeassistant/comments/1hu5h8s/zigbee2mqtt_v200_update_and_action_sensors/
https://community.home-assistant.io/t/z2m-tradfri-without-action-property-latest-updates/822024
"The new Zigbee2MQTT 2.0 introduces the new event based actions for things with buttons. And at the same time deprecates the old way of using binary_sensors. You can still use device triggers which most of us hate with a passion because it uses some ugly long devive IDs that no human can associate with anything and will change is you replace a device. Ugly ugly. The new way is pretty cool. It was introduced as beta in the December release but with Zigbee2MQTT 2.0 it is official. The new action…"
Of course I have re-enabled legacy_action_sensor, but I'm letting you know, maybe you can improve your blueprint to make it compatible with new approach.
Awesome! You should change the mode to 'queued' otherwise its a bit flaky
https://www.zigbee2mqtt.io/devices/E1524_E1810.html#troubleshooting-automations-triggered-by-button-presses-throw-exceptions