Thanks, it looks like it should be possible with that.
Although I’m not sure how I’d adapt it to my simpler switch (just turning on/off scenes or scripts).
I don’t think my understanding of Home Assistant is quite up to that
The alternative is to use automation and input select like here. The automation will run your scene when input select goes on and run a scene when it goes off.
The template switch should work but you need to decide how you want its state to appear. If it doesn’t matter how it appears, then you should replace value template with anything.
I can’t seem to get this working
I tried many things.
Error I get now is:
2017-11-11 17:15:55 ERROR (MainThread) [homeassistant.config] Invalid config for [switch.template]: [Badkamer_Verwarming] is an invalid option for [switch.template]. Check: switch.template->switches->Badkamer_Verwarming. (See ?, line ?). Please check the docs at https://home-assistant.io/components/switch.template/
So capitals letters are not allowed. No errors now but…when I flip the switch it does trigger the scene (badkamer_aan), however the switch flips rigth back to the off state.
So I can’t flip it off manually to run the turn_off scene.
Any idea about that?
My goal is that I have 1 switch to “toggle” the running of 2 separate scenes.
When turned on it runs the scene that turns my heater on and when turned off it should run the scene that turns my heater off.
I thought reading the earlier posted code would do that.
Let’s say your heater is switch.heater.
Let’s say further that switch.heater is turned on with scene.badkamer_aan and switch.heater is turned off with scene.badkamer_uit.
The you could use this template to determine if the switch is on or off:
Ah ok I understand. Problem is, the heater itself is not a switch. I set a temperature and then the zwave device opens/closes the valve more or less.
So the only reading I can do is the temperature.
If above 26 degrees then the (on) scene to put it on that setting was run.
If it’s below 15 the (off) scene ran to put it on that setting.
So you know how I can change that value template to check whether it’s above or below a certain temp?
I think I’m running into similar problems, I can press once and it seem to activate the scene but it seem to reset the scene state to off even tho its the good one playing. when I press again , nothing happen (probably because its trying to re-do the same scene).