Can someone assist with the correct formatting for a dedicated yaml file for my alarm panel? I’m using Envisalink 3 with DSC and it works fine when integrated into the main configuration.yaml. In the interest of keeping things tidy though, I’ve split up my files as many have done but when I include the alarm-panel.yaml file, HASS dies completely. No SSH access, no SMB, no webpage. I’ve just had to use Parted Magic to remove the alarm_panel.yaml file and edit the configuration.yaml to remove the included file in the hope that I can get HASS started again. The following works in the main config:
Heading home now to see if HASS will start with cleaned card. Any advice would be appreciated. I’d provide a log file, but you’ll see below that there is a problem with the log I recovered from the dead system (I’ve had this happen before while trying to add binary sensors).
Unfortunately my instance of HA is unrecoverable. This is the 2nd time a config error has completely killed my Pi with a 0 byte log file so loosing faith fast. Will rebuild tonight and try again.
No. I know where to put it, just not how to format it when it’s in its own yaml. Works fine in configuration.yaml so have left it there for now. Online YAML checkers of no use when it comes to dedictaed yaml files as they do not report incorrect indents. e.g. The following reports as a correctly formatted YAML file but when included in sensors.yaml, prevents HASS from starting.
The correct format is below but finding instruction on when to indent and when not to is cumbersome and not made any easier when yaml checkers don’t work. For me at least it’s a steep learning curve with lots of trial and error, constant reboots and log files inspections.
- platform: template
sensors:
garage_door:
value_template: '{% if is_state("binary_sensor.01_fibaro_garage_door", "on") %}Open{% else %}Closed{% endif %}'
friendly_name: 'Garage Door Status'
I’m not sure of you got this working or not, but I ran into a number of similar issues last night when first splitting up my configuration.yaml and getting the new syntax’s right… ( differences needed when using !include, !include_dir_merge_list, !include_dir_named, etc…)
I didn’t run into any issues with the alarm panel though,
Here’s snippets of my configueation.yaml before:
homeassistant:
# Name of the location where Home Assistant is running
name: Home
…yadayada
homeassistant:
# Name of the location where Home Assistant is running
name: Home
...yadayada
### Security ###
# Security Panel integration software/hardware, network interfaces etc...
envisalink: !include envisalink.yaml
...yadayada
I think you just made a glitch by adding a platform line, so far in splitting things out I haven’t found the need to add any lines, its primarily been cutting everything below the section out and pasting it into a new file, and trying to focus/figure out the indentation which I just realized I believe my envisalink.yaml might be indented 2 extra spaces off the bat…
my ocd says to try changing it, reading your problem and the hard crash makes me think I’ll just leave it alone…