@stx21 I’m also trying to get this to work just right now. The error you notice is most likely not related to the issue here. I’m seeing the same alert in other blueprints but they work fine…
The problem we both seem to have is that the trigger data is different to what is expected here. For example, this the event data I’m receiving when listening to zha_event via developer tools:
The blueprint expects to read trigger.event.data.event and trigger.event.data.args.subtype, but they are not set as you can see above.
I’m not sure where that difference comes from. Different hardware models? Different firmware? I’m not sure if the blueprint needs to be adjusted or if something with my setup is wrong…(?)
I see the same when listening to zha_event – however, in the past, I had automations setup with event and sub_event as triggers, and they worked totally fine. For example:
- id: ''
alias: Play Favorites in Office
description: ''
trigger:
- device_id: ...
domain: zha
platform: device
type: device_knocked
subtype: face_3
condition: []
action:
- service: media_player.select_source
data:
source: Your Top Songs 2020
entity_id: media_player.office
etc. using the commands “slide”, “knock”, “flip”, “shake”, “drop”, “rotate_right”, “rotate_left”.
I also noticed that the *_any events like flipped_any_face need to be moved to the bottom of the list because otherwise, events like “flipped_face_1” would never be triggered…
Note: I was unable to test the “drop” event. Not sure how to trigger this one…
@bobchadwick Can you update the blueprint, please? Or can I create a pull request for it somewhere? Not sure about the workflow yet for doing blueprints contributions…
My guess is that the original author might not have the latest zigpy and/or zha-device-handlers – I think the command vs. event is a result of newer zha-device-handlers quirks for the cube being applied, since they take over translating the device’s events.
Hey, thanks for the suggested fixes! I haven’t had time to implement them, and I don’t have the blueprint in a repo. Hopefully I’ll find the time this weekend, otherwise it’ll have to wait until after the weekend.
Oh yeah, another thing. I’ve realized this probably isn’t the best use-case for a blueprint, since the actions are already mapped in ZHA. Seems like this is kinda duplicating the functionality you’d get by just using automations. Thoughts?
Well having a Blueprint available means you can share it with us and we don’t have to sift through it to replace your entity_id's with our own. It’s definitely worth having. Have a look at the deCONZ version that Andreas has made, it looks pretty awesome (but I use ZHA).
Hey folks, sorry I haven’t been able to get this updated (new baby). If someone else wants to give it a go and post the updated blueprint, I can update the original post.
Mind sharing your fully updated blueprint? Sounds like OP is a bit busy at the moment and I am having a bit of difficulty getting your suggestion to work without errors.
Do any of the actions work? I know you sent a knock example but can you try rotate since that is not face specific. See if we can try and narrow down the issue.