ARGH!
Sorry if this is simple but I can’t work this out. I’ve trying to get location triggers to work. I’m getting what appears to be a common error: 2017-06-28 23:54:19 ERROR (SyncWorker_0) [homeassistant.util.yaml] mapping values are not allowed here in "/Users/Vanessa/.homeassistant/automations.yaml", line 34, column 11
line 34 is the first “data” in this automations.yaml file excerpt:
alias: I'm home
id: '1498656841685'
trigger:
- entity_id: device_tracker.johns_iphone_6
from: not home
platform: state
to: home
- action:
- service: notify.ios_johns_iphone_6
data:
message: I'm home!
alias: I've left home
id: '1498656965470'
trigger:
- entity_id: device_tracker.johns_iphone_6
from: home
platform: state
to: not home
- action:
- service: notify.ios_johns_iphone_6
data:
message: I've left home!
or here:
I’ve read all the relevant threads but cannot figure out where I’ve gone wrong.
Can you post the code, then highlight it and select this button in the post editor?
That will preserve the formatting of your code so we can see it properly. The error you got is pointing to a formatting issue but it’s hard to tell where it is from your image.
I think the problem is the data: line, which should be lined up under service: and the message: line which should be indented two spaces under data:. Here’s an example from my setup:
# Dryer Notification Sequence Done
- alias: 'Dryer Done - away'
trigger:
platform: state
entity_id: sensor.aeotec_smart_switch_6_power_11_8
state: '0.0'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.dryer_switch
state: 'on'
- condition: state
entity_id: device_tracker.rpitera_rpitera
state: 'not_home'
action:
- service: notify.pushbullet
data:
message: 'Robert, the dryer is done.'
- service: input_boolean.turn_off
entity_id: input_boolean.dryer_switch
Thank you all again,
I’ll have to take the plunge and learn about this YAML aren’t I, instead of annoying you all with my simple questions. Sigh.
This came from trying to use the graphical interface in HA, but it’s also JSON formatting that I’ll need to get up to speed with as well!
John
Thank you.
I’m going to put the project “on hold” for a few days until my Raspberry arrives. I suspect it will be much easier if I’m speaking the “same language” as all the help files.
John
It’s definitely easier. I came from a Win10 install, which I ran for about twp months. Moved to the Pi and everything just worked so much better and support was easier to find.
Thank you all.
So I have my Pi, installed Noob and then the all-in-one HA installer. Working through the “access remotely using SSL” instructions and have hit a snag where it’s asking me for the password for user “homeassistant”! Step 4 here https://home-assistant.io/docs/ecosystem/certificates/lets_encrypt/#4---obtain-a-tlsssl-certificate-from-lets-encrypt where you enter the command starting with $ ./certbot-auto. The user homeassitant was created by the all in one, and has been loaded on the sudoers list, and has no password. I’ve tried all of my usual ones, blank, “PASSWORD”, etc. I’ve logged out of that user to user Pi and it makes no difference. I’ve run the command prefixed with sudo. Any ideas at all?
Apologies for lack of formatting but I’m on my iPhone waiting for my delayed plane.
Regards,
John
yes I did that and the text to the left of the curser changed to reflect it - sorry I’m not home to copy and paste it. But yes after that step all the commands were within user “home assistant”.
I’ve decided to get remote access to work before proceeding to solve other issues, so I might start again and use Hassbian instead.
John