-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Matter - Pressed Twice (Three, Four) doesn't clear #124236
Comments
Hey there @home-assistant/matter, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) matter documentation |
This is not a repeat of issue #123347 The problem that caused that issue was not identified completely and therefore closed. The yaml solution fails under many scenarios since the event_state doesn't reset. This prevents an action from getting triggered again until a different event_state is triggered. The same trigger may need to happen two times in a row, separated by some time (could be days or more), if another action caused changes to any of the same objects as the initial automation. |
Yes, this is by design for the event entity - the event_type attribute just contains the last fired event type. The only thing that changes every time is the state to the timestamp of the last action. |
To create automations for event entities you never filter for event_type but just for state and then you check the event type with an additional if or choose statement |
The main issue is that a multi press is an event in reality, but it is treated as a state by HA (tied to the trigger on a generic button event), therefore actions that you would want to automate are made more complex. Imagine a motion detector that stayed in the motion state once activated, lack of motion isn't an event so it would never clear if it were handled the same way as multi-press is in HA. The firmware creates the idle event as a timeout of the motion state once motion is no longer detected. Since the matter switches do not maintain multi-press in their firmware, HA is taking on that role. The issue becomes that you cannot create a single automation that handles all the buttons on Matter switch; you would need to create a separate automation for up and down or any other button that may be included to do this intuitively. A trigger Id can be used to accomplish this in a single automation, but this seems overly complex for most non-advanced users. So, I guess this issue should be changed to a feature request to add a state timeout back to "Unknown" to the matter button entities. Or, even better, to have multi-press events be first class attribute citizens on the button with no dependency on state. If you accept the timeout feature, a default option for "forever" would keep the current behavior, but I suspect most users would want it to be a few seconds at most. We could close this issue if required and I can open up a feature request if that's the proper etiquette. |
@LarryWMSN If you're using the Inovelli device, this Blueprint is also very helpful: https://gist.github.com/sethvargo/ed6f1cc1ce9e974f484ec34af00f6776 |
I am using a VTM31 too and the blueprint is exactly the same as what I built as an automation using your guide as a starting point. But my contention is still that this isn't very discoverable for an average user to find and, building an automation from scratch requires understanding more logic and flow skills than most users will have. These multi-press events are individual events that should trigger and then cease to exist, using state may make it easier to create the integration but I don't believe this delivers a good or consistent user experience. I do want to thank @jvmahon and @marcelveldt (and Seth Vargo) for all the work you're putting in. |
This is not a Matter integration issue but a fundamental issue in the event entity itself: when the same event type gets fired multiple times in a row, it doesn't trigger a state update and thus rendering all automations based on the explicit event type unusable. The only workaround for this is to not listen to the event_type attribute but listen to the state change and then filter the event type in your actions (or conditions). That is, at least until this issue gets fixed at core level. |
We have updated the docs for automating on the event entity. For now that's all we can do. Its still not very helpful but on the long run the entire automation editor is going to be redesigned completely and this will be taken into account. |
The problem
When using the new Pressed Twice (three, four or five times) for an automation, the state of the button doesn't clear. This is an issue if a Press Twice event turns on lights in another room and then it is turned off from a different event. The primary event will stay in the Twice Pressed status, so it won't trigger as expected the next time. This can be worked around by doing a single, triple... press to change the status, but that's not optimal as those events can have automations tied to them.
What version of Home Assistant Core has the issue?
core-2024.8.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Matter
Link to integration documentation on our website
https://www.home-assistant.io/integrations/matter
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: