I did some automation to change the operation_mode of the climate vs input_select and vice-versa and I have the feeling that the automations are executed recurrently. Here are the automation:
My first question is, why are you trying to keep an input_select in sync with a climate setting? Why not just use the climate entity directly?
Having said (or asked) that, I don’t think you have to worry about an infinite loop here. If you change an entity to the state it already is, that (generally) does not cause a new state_changed event. (I say “generally” because some components can force a state_changed event even if the state doesn’t change.)
Lastly, why are you using an event trigger instead of a state trigger? E.g., why not:
trigger:
platform: state
entity_id: sensor.modo_termostato
and
trigger:
platform: state
entity_id: input_select.thermostat_mode
My first question is, why are you trying to keep an input_select in sync with a climate setting? Why not just use the climate entity directly?
The reason is that I use hadashboard when I am at home and you can not change the operation_mode with the climete widget In fact, when I am using hass with my mobile or laptop I change it via climate entity directly and don’t use the input_select.
For your second question… yes, you are right. I could use the state platform directly but why not to complicate what it is easy?? (I’m joking) I didn’t it because I started using the platform event… nothing else