Simple one I hope, I just can’t see it.
I have a switch that calls a command to turn my media PC off
I have a switch that used WOL to turn my media PC on
I have a switch template that combines these to give a nice user friendly on-off switch in the UI
Since reformating the YAML to new command_line the template will not switch on the media PC. the WOL switch works fine, just seems my template switch is not calling it.
Heres where I am:
command_line:
- sensor:
name: CPU Temperature
command: "cat /sys/class/thermal/thermal_zone0/temp"
# If errors occur, make sure configuration file is encoded as UTF-8
unit_of_measurement: "°C"
value_template: "{{ value | multiply(0.001) | round(1) }}"
#Red Dwarf Control - Switch off command line
- switch:
name: REDDWARF_OFF
#template calls this switch as toggle, so same action if on or off
command_on: >
curl http://192.168.50.87:8000/?action=System.Shutdown
command_off: >
curl http://192.168.50.87:8000/?action=System.Shutdown
switch:
#Red Dwarf Control - switch for wake on LAN
- platform: wake_on_lan
#name: REDDWARF_ON (name does not seem to be working)
mac: 10:7B:44:17:C5:EF
#Red Dwarf Control - Switch template to show in UI. combines
- platform: template
switches:
reddwarf:
unique_id: RedDwarf_User_Switch
value_template: "{{ states.binary_sensor.reddwarfiii_status.state }}"
turn_on:
- service: switch.turn_on
target:
entity_id: switch.wake_on_lan #should be switch.REDDWARF_ON?
turn_off:
- service: switch.toggle
target:
entity_id: switch.REDDWARF_OFF