-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for issue discussed in #198. #199
Conversation
… unique from Scenes and device_trigger /config topic was too long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really very strange that these changes. The device
part should not have to be unique (it IS the same device), and mqtt topic length also seems strange as a limitation...
But going from not working to working is of course a great step forward!
Yea, agree. |
Yeah, I understand, still strange! With the working solution - can you see the device triggers somewhere in HA? Do they show up in the Logbook? Can you see a device with entity connected? |
Maybe not super strange. From
Yes, see screenshots below. Note "Model" is named Scene by you ;-)
EDIT: |
With the current develop (without this PR) I can see similar info under MQTT info under the scene which shows up under entities. I also see the MQTT message come through, but no automation is triggered. Maybe it is as you say that while you can combine sensors and outputs in one device you cant combine scenes and other stuff (device triggers) in one device... |
I had strange and random behavior without the patch. Example:
Example:
As I said, strange and random behavior. |
… so that following device_automations gets executed. This will make Plejd Scene execution behave the same from Plejd App, Plejd Hardware and Home Assistant Scene triggered - in the eyes of Home Assistant
Ok, I think I made a [small] mistake when I created this PR. Anyway; the latest push is relevant for this PR. Please check it out. It's the feature that was not a bug wrt. Plejd Scenes from HA not being reported back to HA for automations... |
Been looking into this trying to recreate the issues again aiming to bring the length issue to the devs of HA. My suspicion is that the "id" issue leaves some weird things in device registry causing these strange behaviors. Nevertheless, I recommend the leave the fixes as proposed in PR as they appear to work and that I have seen weirdness with the length; even though I cannot reproduce it now. |
Alright, merging this then. Thanks for the fix! |
If I understand it correctly, the 0.8.0-beta should make device triggers work? However, even with the 0.8.0-beta installed I can't get my automation in Home Assistant to trigger repeatedly. Every following time the plejd scenario gets called (double click physical switch) the original message fails to be replaced but it seems as if a message goes through on the parent topic (homeassistant/device_automation/plejd/XXXX_trig/ instead of homeassistant/device_automation/plejd/XXXX_trig/config). Sometimes the message is retained but still can't be replaced. If I delete the entire message in MQTT explorer and then double-click, an empty message is created with topic homeassistant/device_automation/plejd/XXXX_trig/state. After that, for each double-click, the empty message is deleted and created. If I restart the plejd add-on, the messages are recreated and the automation triggers once. Do you have any ideas on what to do? I would really like to be able to trigger HA automations with Plejd scenes. |
Found another thread discussing this and will answer my own question. Triggering an automation by an MQTT PLEJD automation trigger in HA isn't done by reacting to the MQTT message, rather using the created device with the same name as the scenario in the PLEJD app as a trigger. This works fine for me. |
Scene device triggers were not unique from Scenes and device_trigger /config topic was too long