#Blueprint to revert manual override

1 messages · Page 1 of 1 (latest)

silent plover
#

I have a bunch of TRVs in my house, they run on a schedule that Ive defined with the scheduler component installed via HACS. This is working great.

I want to define 2 blueprints for the following automations:

  • if the temperature is changed to another value as in the schedule (a manual change). Start a timer.
  • if the timer finishes, set the temperature back to the one in the schedule

with the 'help' of chatGPT I got this blueprint
https://paste.debian.net/hidden/b9dda0b2

As experienced user probably notice, this condition doesnt work. The value_template doesnt properly resolve the values it seems.
I tried many differeny iterations of this but all attempts seem to boil down to, 'you cannot use variables that way'.

I tried to look trough the documentation, but it doesnt mention how to properly use the input entities in jinja templates.

cerulean plank
#

What do you think is wrong with it?

#

Like, what is not working

silent plover
#

Well I can't really figure it out, when I change the temperature and look at the traces of an automation created with this blueprint I see the following:

for the trigger:

and for the condition/template

Not sure if that is any help?

cerulean plank
#
      {% set scheduler = states[scheduler_switch] %}
      {% set actions = state_attr(scheduler, 'actions') %}

I think this is wrong

#

state_attr takes an entity_id / string as the first option, you're passing it the state object

#

For complex templates it is easier if you try to make it work first in the developer tools before putting it in the blueprint

#

Error in describing trigger: Cannot read properties of undefined (reading 'includes')
I think you can ignore this

silent plover
#

you mean developer tools > template? i couldnt figure out how to get the varables there

should i switch
{% set scheduler = states[scheduler_switch] %} to get the entity id then somehow?

cerulean plank
#

scheduler_switch is the entity_id, you already have it

#

{% set actions = state_attr(scheduler_switch, 'actions') %}

#

same for slot