File Editor and HA Config/Check configuration can’t come to terms what is correct YAML. I have “binary_sensor:” twice in my config.yaml (once in Switches, once in Sensors, for some historic reason I don’t remember). It was never an issue, everything checked out fine for more than two years.
Until now.
Now, with my original config.yaml, File Editor complains about that (red !), but Check is valid.
When I “fix” this by consolidating all binary sensors into one place and delete the second “binary_sensor:” heading, File Editor is happy (green checkmark) but Check Configuration spins indefinitely.
Any ideas? config.yaml is here. This is the version that does not check out in HA Config - the checking spins indefinitely. In the original, lines 432-515 (sensors from “PCWin - Connected” to ‘Window Sensor LR’) were under #-------SWITCHES-------# under their own binary_sensor: heading. That’s the whole extent of changes.
Sadly I can’t say with 100% certainty when this started to happen. Probably a month or so ago.
run the config check from SSH/Terminal. That will show you any errors, if you have them. At a glance, all your binary_sensor templates are incorrectly formatted. You have:
- platform: template
sensors:
greta_temperature_too_high:
value_template: "{{ states('sensor.ble_temperature_greta_sensor')|float > 30.0 }}"
friendly_name: 'Greta Room Temperature too high'
and they should look like
- platform: template
sensors:
greta_temperature_too_high:
value_template: "{{ states('sensor.ble_temperature_greta_sensor')|float > 30.0 }}"
friendly_name: 'Greta Room Temperature too high'
Also, you don’t need all the redundant platforms. You can combine them into 1 platform template.
- platform: template
sensors:
greta_temperature_too_high:
value_template: "{{ states('sensor.ble_temperature_greta_sensor')|float > 30.0 }}"
friendly_name: 'Greta Room Temperature too high'
kitchen_temperature_too_high:
value_template: "{{ states('sensor.582d3439b93e_temperature')|float > 30.0 }}"
friendly_name: 'Kitchen Temperature too high'
bedroom_temperature_too_high:
value_template: "{{ states('sensor.ble_temperature_bedroom_sensor')|float > 30.0 }}"
friendly_name: 'Bedroom Temperature too high'
lr_temperature_too_high:
value_template: "{{ states('sensor.ble_temperature_living_room_sensor')|float > 30.0 }}"
friendly_name: 'Living Room Temperature too high'
Lastly, you have a bunch of those template binary_sensors starting with capital letters. They shouldn’t have capitals at all.
Thank you very much, it all checks out now. What’s interesting is that I didn’t touch these “Temp too high” template sensors before at all (and they were working fine, despite being malformed), I was moving something else.