Dear,
I have just added my heating via ebus to HA.
What I now want to do is to add a “state” sensor, which is based on certain sensor values.
To give you an impression - what I want to do something like this
If sensor.desired_temperature changes
Then
if newsensorvalue.desired_temperature matches sensor.absence_temperature then set sensor.heating_state to “Absence”
Else
if newsensorvalue.desired_temperature matches sensor.veto_temperature then set sensor.heating_state to “Quick Veto”
Else
set sensor.heating_state to “Time controlled”
I tried to get it working using automation with a starte change trigger. However, I seem to be lost in the further approach.
Thank you for your feedback. So templating seems the way to go. Since I did not work with this so far, I will have a look into what you shared.
One follow-up question - the state_sensor I described, would be a helper/ template one, right?
Just a side note for version 2: you should probably first test availability of the sensors, otherwice the template would return the first option since int(0) means it will return 0 when the sensor is unavailable.
Thank you for pointing this out - but first of all a happy New Year.
If I was rather in my „comfort zone“ (I am working with the MS Power Platform rather than with Jinja2), I would have the another condition added like