官方文档里偶尔看到的
我没用过,供参考
switch:
- platform: command_line
switches:
tv_rpi:
command_on: ssh root@[IP] "echo 'on 0' | cec-client -s"
command_off: ssh root@[IP] "echo 'standby 0' | cec-client -s"
command_state: ssh root@[IP] "echo 'pow 0' | cec-client -s |grep 'power status:'"
value_template: '{{ value == "power status: on" }}'
|