Can someone explain the state_action parameter to me? #18312
Replies: 3 comments 8 replies
-
No one? :( |
Beta Was this translation helpful? Give feedback.
-
I just came here to investigate the same mystery. Whenever we find out what that setting actually does, we should push to update the documentation to something clearer. |
Beta Was this translation helpful? Give feedback.
-
I'm also struggling to find any decent explanation so I resorted to asking ChatGPT 4o, it's given by far the best explanation I've found (assuming it's accurate!). I figured I may as well share it: My prompt: My fingerbot has a setting i dont understand in Z2M: "state_action: State actions will also be published as 'action' when true". Can you please explain? Responce: When state_action is set to true: Every time the Fingerbot performs an action (like pressing a button), it will also publish an “action” event. This event is essentially a message that Home Assistant can pick up, letting you know the Fingerbot’s current state or action. For example, if the Fingerbot presses the button, it will not only change the state (e.g., from off to on) but will also publish an “action” event to the MQTT topic (if you’re using MQTT). This can be useful if you want to create automations that specifically listen for these action events or track when the Fingerbot does something. When state_action is set to false: The Fingerbot will only publish its “on” or “off” state without publishing additional “action” events. This mode is simpler but doesn’t allow for tracking individual actions as separate events. How It Helps in Automations If you enable state_action, you can use the “action” event to trigger specific automations. For instance, if you want to confirm each button press by capturing the action event in Home Assistant, setting state_action to true would be helpful. You’d be able to create automations that react every time the Fingerbot reports an action, making the setup more responsive and potentially more reliable. |
Beta Was this translation helpful? Give feedback.
-
Hello, I have tried searching everywhere for this but couldn't find any information.
Every ZigBee device I have installed has the following option in the "Settings (specific)" tab:
state_action: State actions will also be published as 'action' when true (default false). The value must be true or false
Could someone please explain what's this for? I really don't understand what it means/does and I never know whether I should select true or false.
Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions