Hi all, I have read a few previous post but I was not able to get this working! hopefully someone can help this newbie:
I have create two scripts and they both worked. and they show up on HA as two different scripts as expected.
I am now trying to make it show up on HA as ON OFF button to running the different scripts. I tried command_line and template platform and they did not work.
this is the exact error message for switch template:
ERROR:homeassistant.config:Invalid config for [switch.template]: required key not provided @ data[‘switches’][‘modified_golf_2’][‘value_template’]. Got None
anyone out there have used command_line button to run two scripts? can you help me? yaml compiled and button show up; but don’t work when I click on button, but the script work.
Hi all, I have got it working using a input-boolean switch to run two automation as shown below.
This HA switch I am using is for my TV where previously; if it is on and I use alexa to turn on tv again accidentally, it will turn it off. So I added a Sonoff power switch for my TV and the code shown below.
I now have a problem that if I turn tv on with HA and turn off with remote, boolean switch stays in ON mode. wondering if anyone can give me some suggestion
Hi all, I got it all working after reading some more exapmle and your suggestions.
thanks for all your help.
with living tv, it is old tv and have not internet connection.
I have many sonoffs, flashed with Tasmota.
Therefore I use the living TV usb port plus FT232RL 3.3V FTDI USB to TTL Serial Adapter to power up the sonoff.
I than use binary_sensor to ping the sonoff to check the status.
I don’t even have to have to worry about the power supply for the tv now, just normal power supply.
Then the input_boolean switch to activate the two automations.
code as below, i hope this might help others who has same issue.
Thank you all; until the next time! See you all again soon.