Hi, I want to pre-set a selector and on a certain condition send that value to the real selector.
I can set my EV charger to 4 different modes (off, solar, normal and smart).
I made an automation so that on “car connected” the selector switches to one of these four modes. Made it plug and play, so to say. I can’t set the selector if the car is not connected because it defaults to off in that case, and is does not retain any mode after unplugging.
That all works fine, but I’m trying something different now.
I made a helper with identical four modes (off, normal, solar and smart again). That helper stays in any mode I set it in. On condition “car connected” I want to set the REAL selector mode same as the pre-set HELPER selector. I came up with the following but it throws an error at me. Guess I need some help.
key elemenst are:
topic: SmartEVSE/Mode
payload: OFF | SOLAR | NORMAL | SMART
selector helper: input_select.mode_on_carconnect
smartevse real selector: select.smartevse_mode
TemplateSyntaxError: Unexpected end of template. Jinja was looking for the following tags: ‘endif’. The innermost block that needs to be closed is ‘if’.
Thx, should have explained that I have a hard time reading (code). My sight is not perfect.
Your solution works like a charm. I was thinking about passing a value from one ID to another. Now I know how to do that a next time. And yes, I’ll study the docs. Thx again.