Desired State with dependancies

Hi,

i currently migrate from openHAB to Home-Assistant. As i already did some stuff i am now planing to migrate my automations.

While planning i was asking myself if there might be in HA something i missed in Openhab all the time. And this is disired State model. So the ability to set a desired State for one entity and HA tracks if this is changed and if, set it back to the desired State.

For example i have an automation which sets my heater to lowest value while window is opened. In OpenHAB i just used this trigger to set the state of the entity. But if someone changed the value of the heater, it would be heating again. Also could be a usecase, that you set borders of possible values, wo that the heater will never be set over 21°C.

So is there a chance to configure desired State on HA or do i have to do this my own, by creating a rule that periodically checks and sets values?

You would do this with an automation.

OK, so just let a script running regularely to set the desired State?
Yeah, this would be the fallback if there is no functionallity inside HA.

No, trigger an automation on a change and set the desired state in the actions.

Ah ok, u mean i set a trigger on entity change for all the entities i to have desired state configured…
OK, it is the better solution but would require rules for all entities…
OK, thank you, i will get into this in holiday season.

If i wanted to set this value, for example for target temperature in a systemwide “variable” how to do that the best way?

Use an input_number.