Hello, I have a input select that is updated by a automation (mqtt trigger) also if I change the value of input select I send a mqtt message! The problem is that when I recive a mqtt message to update the input select option, that update triggeres the on change rule and sends a mqtt message! Can I update the input select state without triggering the other rules?
The solution is to use an input_boolean to serve as an āupdate-lockā flag.
Example:
Automation #1 is responsible for updating the input_select.
Automation #2 is responsible for monitoring input_select and publishing its state-changes.
Automation #1 sets the input_boolean then updates the input_select.
The update triggers automation #2. However, it has a condition that checks if the input_boolean is set. If it is set (meaning automation #1 is in the process of writing to input_select), then automation #2 does not execute its action (publishing the state-change).
Automation #1 completes its action by resetting the input_boolean.
The following thread contains the complete solution. for an input_number, provided by AhmadK.
Hereās essentially the same code, adapted for an input_select:
Home Assistant is a community-based project therefore you have these options available to you:
If you have the required programming skills, you can create the new feature and submit a Pull Request in GitHub.
If you do not have the required skills, you can create a Feature Request (others can vote for it) and hope someone, who does have the required skills, likes the idea and implements it.
Itās an old thread, but I fall here searching to change the state of an input_boolean from another automation, without triggering the usual automation related with that boolean.
And did it this simple way: 1.- turning off the automation, 2.-toggle the boolean, 3.-reactivate the automation. It may be a simpler way to do it in some cases.
You should probably consider redesigning your automations.
Because to have one automation behave normally it first has to disable another automation is a helluva kludge; it points to a fundamental weakness in the overall design.