I was editing my ‘Automation.yaml’ file to change my morning turn off light event from this:
- alias: Turn off driveway lights when sun rises
trigger:
platform: sun
event: sunrise
offset: "00:20:00"
action:
service: switch.turn_off
entity_id: switch.leviton_unknown_type1c02_id0334_switch_4_0
to this
- alias: Turn off Outside group when sun rises
trigger:
platform: sun
event: sunrise
offset: "00:20:00"
action:
service: homeassistant.turn_off
entity_id: group.outside
After making the change and uploading the file, HASS failed to start when I restarted the service. I tried various permutations within the section until I put it back exactly the way it was and after that restart, still not starting.
When I looked in the home-assistant.log file, I found one entry (each time I restart HASS, the line stays the same except for the timestamp):
17-01-25 12:36:58 homeassistant.util.yaml: while parsing a block mapping
in “/home/hass/.homeassistant/configuration.yaml”, line 3, column 3
expected , but found ‘’
in “/home/hass/.homeassistant/configuration.yaml”, line 16, column 9
I didn’t touch my configuration.yaml at all, so I have no idea why it worked before and now decided not to, but this is my sanitized configuration.yaml:
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: XX.XX
longitude: XX.XX
# Impacts weather/sunrise data
elevation: X
# metric for Metric, imperial for Imperial
unit_system: imperial
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: America/Chicago
customize: !include customize.yaml
#Show links to resources in log air('blib', 'arch');
if ($source eq $blib_lib and
exists $from_to{$blib_arch} and
directory_not_empty($blib_arch)
){
$targetroot = install_rooted_dir($from_to{$blib_arch});
print "Files found in $blib_arch: installing files in $blib_lib into architecture dependent library tree\n";
}
next unless -d $source;
_chdir($source);
# 5.5.3's File::Find missing no_chdir option
# XXX OS-SPECIFIC
# File::Find seems to always be Unixy except on MacPerl :(
my $current_directory= $Is_MacPerl ? $Curdir : '.';
find(sub {
my ($mode,$size,$atime,$mtime) = (stat)[2,7,8,9];
return if !-f _;
my $origfile = $_;
return if $origfile eq ".exists";
my $targetdir = File::Spec->catdir($targetroot, $File::Find::dir);
my $targetfile = File::Spec->catfile($targetdir, $origfile);
my $sourcedir = File::Spec->catdir($source, $File::Find::dir);
my $sourcefile = File::Spec->catfile($sourcedir, $origfile);
for my $pat (@$skip) {
if ( $sourcefile=~/$pat/ ) {
Line 16 is this. column 9 is the ‘i’ in ‘if’:
if ($source eq $blib_lib and
I do not know what the ’ #Show links to resources in log air(‘blib’, ‘arch’);’ section is, I assume it’s something that HASS put in by default and it seems to be related to the log file as when I comment the entire section out and restart, the log file does not appear to be written to upon restart.
Any ideas why my HASS seems to have suddenly died?
Edit: I looked in my OZW_Log.txt and found this at the end. Not sure if it may be related:
2017-01-25 12:10:40.845 Info, mgr, Driver for controller /dev/ttyS0 removed
2017-01-25 12:10:41.856 Error, mgr, Manager::GetDriver failed - Home ID 0xc0c97f16 is unknown
2017-01-25 12:10:41.856 Warning, Exception: Manager.cpp:373 - 100 - Invalid HomeId passed to GetDriver
2017-01-25 12:10:41.856 Info, mgr, GetSendQueueCount() failed - _homeId -1060536554 not found
Again, prior to it failing, the ONLY thing I modified was my automation.yaml file.