Sorry been away for quite a while and trying to work through some bits that are not working now.
I now get this if I try to reboot
Failed to restart Home Assistant
The system cannot restart because the configuration is not valid: Invalid config for [command_line]: expected a dictionary for dictionary value @ data['command_line'][0]['sensor']. Got None extra keys not allowed @ data['command_line'][0]['command']. Got 'cat /sys/class/thermal/thermal_zone0/temp' extra keys not allowed @ data['command_line'][0]['name']. Got 'CPU Temp' extra keys not allowed @ data['command_line'][0]['unit_of_measurement']. Got '°C' extra keys not allowed @ data['command_line'][0]['value_template']. Got '{{ value | multiply(0.001) | round(1) }}'. (See /config/configuration.yaml, line 10).
The issue is I have moved my command line bits to their own yaml.
I have a file called “command_line.yaml”
I then have:
command_line: !include command_line.yaml
in my configuration and this in my command_line file
- sensor:
name: CPU Temp
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) }}'
- platform: command_line
command: 'curl ifconfig.me'
scan_interval: 600
name: WAN IP
- platform: command_line
command: 'dig +short USERNAME.duckdns.org.'
scan_interval: 600
name: DNS IP
but the error doesnt make much sense to me sorry. The code in command line was originally in my configuration file.