outrun
(Lukas Ecklmayr)
November 13, 2016, 5:42pm
1
He Guys,
I have a very basic Question. I started today with automation. Heres my 1st Automation:
alias: ‘TV Ambiente Ein’
trigger:
platform: state
entity_id: media_player.tv
state: ‘on’
condition: time
after: 17:30:00
action:
service: light.turn_on
data:
entity_id: light.tv_ambiente
Log is saying:
16-11-13 18:34:10 homeassistant.bootstrap: Invalid config for [automation]: expected a dictionary @ data[‘condition’][0]. Got None
extra keys not allowed @ data[‘after’]. Got {}. (See /home/hass/.homeassistant/automation.yaml:0). Please check the docs at Automation - Home Assistant
I’m sitting here for 2 hours now an can’t figure out whats going wrong.
Any help on that?
Thanks a lot.
BR
Lukas
outrun
(Lukas Ecklmayr)
November 13, 2016, 6:02pm
2
Look down (Made now Post with the Correct Code)
ih8gates
(Scott Reston)
November 13, 2016, 6:18pm
3
For future reference, use the code markup (</> button above the editor) so that we can read your config. Indentation is important.
outrun
(Lukas Ecklmayr)
November 13, 2016, 6:19pm
4
@ih8gates I did, but i looks like Code Markup messed up my Code
rpitera
(Robert Pitera)
November 13, 2016, 6:19pm
5
You can do that by highlighting your code block and then clicking on the button indicated in the image below:
ih8gates
(Scott Reston)
November 13, 2016, 6:21pm
6
Looks like you also used blockquote. Those can conflict. Just use code.
outrun
(Lukas Ecklmayr)
November 13, 2016, 6:26pm
8
Heres the Working Code:
- alias: 'TV Ambiente Ein'
trigger:
platform: state
entity_id: media_player.tv
state: 'on'
condition:
condition: sun
after: 'sunset'
action:
service: homeassistant.turn_on
entity_id: light.tv_ambiente