Iâm trying to make the double press work on my E1812 through your blueprint.
I would like my Google Nest Mini talk to me on double press (service: tts.google_say) but Iâm not sure whether I need to use the Media Player blueprint on top of the main blueprint
Do I need to fill in the Helper - Last Controller Event and with what ?..
Thank you for your pointers !
My actual goal is to double press the shortcut button and have my GNMini tell me when the next bus is (+ switching on a green or red light) which works fine with the following automation on a single click with no fancy blueprint.
alias: 'Bus : announce next bus on button click'
description: ''
trigger:
- device_id: e89302a904a3c40c4a456307c2dca5d9
domain: deconz
platform: device
type: remote_button_short_press
subtype: ''
condition: []
action:
- service: tts.google_say
data:
message: Next bus in {{ states('sensor.ratp_bry_next') }} minutes
entity_id: media_player.salon
- service: light.turn_on
data:
color_name: |
{% if states('sensor.ratp_bry_next') | int >= 5 %}
green
{% else %}
red
{% endif %}
brightness_pct: 100
target:
entity_id: light.piano_strip
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- type: turn_off
device_id: 069b72bbf0acd6390761b775cf2f309e
entity_id: light.piano_strip
domain: light
mode: single
Similar to @BeastHouse I started having the same trouble with all my buttons. Iâm using ZHA and have HA updated. Iâve restarted HA, deleted and remade the automations, but nothing seems to fix it. All my IKEA shortcut buttons give this error now.
Stopped because an error was encountered at December 16, 2021, 11:51:08 AM (runtime: 0.05 seconds)
UndefinedError: âdict objectâ has no attribute âeventâ
If anyone else has the problem and found a solution Iâd love to hear how. Thanks!
I was having trouble with the double press and long press using ZHA. Got them fixed with some simple code changes, just sharing here in case others find it useful:
In blueprints/automation/EPMatt/ikea_e1812.yaml
First change the variables:
Iâve paired my Tradfri shortcut button, set up the helper and selected the controller, but this blueprint just doesnât appear to work - listening on zha_event fires nothing, so appears dud.
Thanks for the BP! Single press and long press are working via Z2M but for some reason double press doesnât work, when I view the traces I see the first tap causes the single press event to run, the delay is executed to wait for the potential second tap and although the second one runs it fails the first condition so I assume thatâs why the first event still runs after the delay completes. Initially I was running the original firmware version it shipped with (2.3.015) and just upgraded to 2.3.080 but no change in behaviour. Any ideas?
Another issue now. Short press works. It fires the event and turn on a lamp. Long press and double press doesnât work properly. In the history log for my button it fires the event for long press and double press. But nothing actually happens with my lamp.
Same issue for me, after updating to 2.3.080 double click no longer registers. I donât even see the events in the log. Has anyone been able to work around this?
Edit: I should mention that single click and long press events work fine and show up in the log correctly.
Has anyone got this to successfully work with Zigbee2MQTT?
I have the Shortcut button working through Zigbee2MQTT fine and I can setup a basic automation to switch on a light. This blueprint is ideal but when setup it just doesnât trigger the required action. You can see the button is being pressed in the Blueprint events.
The automation will store the trigger_action as follows:
trigger_action: '{{ trigger.event.data.command }}{{"_" if trigger.event.data.args|length > 0}}{{ trigger.event.data.args|join("_") }}'
Later in that automation the trigger_action is evaluated against the button_long variable, which for ZHA is defined as follows:
button_long: [move_with_on_off_0_83]
For some reason the automation however picks up the above shown zha_event and evaluates that to move_with_on_off_MoveMode.Up_83. Can somebody explain what is happening here?
The template to create the trigger_action variable clearly is appending the trigger.event.data.command which is move_with_on_off by _ followed by the trigger.event.data.args separated by further _, if there are any args.
So I would expect the string to be move_with_on_off_0_83 and the automation to work⌠but somehow it is not.
Edit: I found this on Github and ammended my automation with the proposed changes. The automation is now working.
I just added this blueprint with deconz as the integration. It appears that the double-click is exposed as a discrete event in Deconz with code 2004. What would be needed to modify the blueprint to recognize 2004 as double-click instead of the virtual version?
From what I can tell, the deconz codes are 1002 (single click), 2004 (double click), 1001 (hold/long press), 1003 (release/long press).
There is an issue with the regex used in these blueprints for the Ikea buttons after a HA release. It doesnât look like these blueprints are being actively maintained as it was last updated over a year ago.
Please see the following post and thread that has the fix which involves you updating the blueprint file and removing some spaces from the regex statement: