Hi all,
Really loving HA! I switched from OpenHAB this week, and I really love the interface. Starting to get the hang of things, I think.
But, I’m having a little bit of trouble getting automation working in conjunction with the device tracker. I have basic automation (‘turn front porch light on 20 minutes before sunset’ type of stuff) working, but what I’m looking to accomplish now is a bit trickier, it seems.
I have my work laptop set up for tracking. It shows up in the UI, when it goes offline, its status is set accurately. I put it in its own group as well:
work:
- device_tracker.Surface
I’m not entirely certain I have this defined correctly. “Surface” is the friendly name of my work PC as defined in known_devices.yaml
chadssurfacebook:
name: Surface
mac: REDACTED
picture: /local/chadwork.jpg
track: yes
hide_if_away: no
I also have a group.office that controls two bulbs. This works fine in the UI.
office:
- light.office_1
- light.office_2
My goal is to create an automation rule such that group.office is switched on every weekday at 8:00 am IF device_tracker.Surface is home. So far I have the following (the weekday part hasn’t been incorporated yet):
automation 3:
- alias: ‘Turn on office lights when working’
trigger:
platform: time
after: ‘08:00:00’
condition: state
entity_id: group.work (LINE 115)
state: home
action:
service: light.turn_on
entity_id: group.office
When this rule is present in the configuration, HA does not start, with the following error in the log:
16-07-22 10:30:26 homeassistant.util.yaml: mapping values are not allowed here
in “/home/chad/.homeassistant/configuration.yaml”, line 115, column 14
Line 115 is indicated in the sample above. It looks like a syntax error, or maybe a misunderstanding about what is/is not allowed as a condition on an automation rule?
Thanks for looking!