alias: ‘Dim lights when playing Netflix in Living Room’
trigger:
platform: state
entity_id: media_player.dikkelul
to: ‘playing’
condition:
condition: sun
after: sunset
after_offset: “-0:20:00”
action:
service: light.turn_on
data:
entity_id: light.woonkamer
brightness: 120
transition: 10
alias: ‘Brighten lights when stop playing Chromecast in Living Room’
trigger:
platform: state
entity_id: media_player.dikkelul
from: ‘playing’
to: ‘off’
platform: state
entity_id: media_player.dikkelul
from: ‘playing’
to: ‘idle’
platform: state
entity_id: media_player.dikkelul
from: ‘playing’
to: ‘paused’
condition:
condition: sun
after: sunset
after_offset: “-0:20:00”
action:
service: light.turn_on
data:
entity_id: light.woonkamer
brightness: 255
transition: 10
alias: ‘Lights on when home pre sunset’
trigger:
platform: sun
event: sunset
offset: “-0:20:00”
platform: state
entity_id: group.all_devices
from: ‘not_home’
to: ‘home’
condition:
condition: and
conditions:
condition: sun
after: sunset
after_offset: “-0:20:00”
condition: state
entity_id: group.all_devices
to: ‘home’
action:
service: light.turn_on
data:
entity_id: light.woonkamer
alias: ‘Lights off when away’
trigger:
platform: state
entity_id: group.all_devices
to: ‘not_home’
action:
service: light.turn_off
data:
entity_id: light.woonkamer
Oke guys working on it now for almost 11 hours, deleted al my automations.
just left with this and even this gives me shit, Help me please:
- alias: 'Lights off when away'
trigger:
- platform: state
entity_id: group.all_devices
to: 'not_home'
action:
service: light.turn_off
data:
entity_id: light.woonkamer
- alias: 'Light when i get home'
trigger:
- platform: state
entity_id: group.all_devices
state: 'home'
- platform: sun
event: sunset
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
service: light.turn_on
data:
entity_id: light.woonkamer
The following errors have been logged this session:
2017-08-09 19:09:05 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [state] is an invalid option for [automation]. Check: automation->trigger->0->state. (See /home/homeassistant/.homeassistant/configuration.yaml, line 109). Please check the docs at Automation - Home Assistant
Failed config
automation:
- action: [source /home/homeassistant/.homeassistant/automation.yaml:6]
data: [source /home/homeassistant/.homeassistant/automation.yaml:8]
entity_id: light.woonkamer
service: light.turn_off
alias: Lights off when away
trigger: [source /home/homeassistant/.homeassistant/automation.yaml:2]
- platform: state
entity_id: group.all_devices
to: not_home
- action: [source /home/homeassistant/.homeassistant/automation.yaml:21]
data: [source /home/homeassistant/.homeassistant/automation.yaml:23]
entity_id: light.woonkamer
service: light.turn_on
alias: Light when i get home
trigger: [source /home/homeassistant/.homeassistant/automation.yaml:12]
- platform: state
entity_id: group.all_devices
state: home
- platform: sun
event: sunset
- condition: state
entity_id: sun.sun
state: below_horizon
Successful config (partial)
automation:
- action: ?
- data: [source /home/homeassistant/.homeassistant/automation.yaml:8]
entity_id: light.woonkamer
service: light.turn_off
alias: Lights off when away
hide_entity: False
trigger: ?
- platform: state
entity_id: ?
- group.all_devices
to: not_home
Still from the breaking changes link. state: in triggers becomes to:
Just a general recommendation. Every new release brings some breaking change. Read through all the release notes and pay special attention to breaking changes. There will almost always be some. If you only update occasionally, go back and read the breaking changes for the updates you missed.
2017-08-09 19:30:28 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: expected dict for dictionary value @ data[‘action’][0][‘data’]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 109). Please check the docs at Automation - Home Assistant
2017-08-09 19:30:28 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [to:] is an invalid option for [automation]. Check: automation->trigger->0->to:. (See /home/homeassistant/.homeassistant/configuration.yaml, line 109). Please check the docs at Automation - Home Assistant
Failed config
automation:
- action: [source /home/homeassistant/.homeassistant/automation.yaml:6]
data: None
entity_id: light.woonkamer
service: light.turn_off
alias: Lights off when away
trigger: [source /home/homeassistant/.homeassistant/automation.yaml:2]
- platform: state
entity_id: group.all_devices
to: not_home
- action: [source /home/homeassistant/.homeassistant/automation.yaml:21]
data: None
entity_id: light.woonkamer
service: light.turn_on
alias: Light when i get home
trigger: [source /home/homeassistant/.homeassistant/automation.yaml:12]
- platform: state
entity_id: group.all_devices
to:: home
- platform: sun
event: sunset
- condition: state
entity_id: sun.sun
to: below_horizon
The following errors have been logged this session:
2017-08-09 19:37:03 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: expected dict for dictionary value @ data[‘action’][0][‘data’]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 109). Please check the docs at https://home-assistant.io/components/automation/
2017-08-09 19:37:03 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: expected dict for dictionary value @ data[‘action’][0][‘data’]. Got None
required key not provided @ data[‘trigger’][2][‘platform’]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 109). Please check the docs at https://home-assistant.io/components/automation/
Failed config
automation:
- action: [source /home/homeassistant/.homeassistant/automation.yaml:6]
entity_id: light.woonkamer
service: light.turn_off
alias: Lights off when away
trigger: [source /home/homeassistant/.homeassistant/automation.yaml:2]
- platform: state
entity_id: group.all_devices
to: not_home
- action: [source /home/homeassistant/.homeassistant/automation.yaml:20]
entity_id: light.woonkamer
service: light.turn_on
alias: Light when i get home
trigger: [source /home/homeassistant/.homeassistant/automation.yaml:11]
- platform: state
entity_id: group.all_devices
to: home
- platform: sun
event: sunset
- condition: state
entity_id: sun.sun
to: below_horizon
Successful config (partial)
automation:
- action: ?
- entity_id: ?
- light.woonkamer
service: light.turn_off
alias: Lights off when away
hide_entity: False
trigger: ?
- platform: state
entity_id: ?
- group.all_devices
to: not_home
- alias: 'Lights off when away'
trigger:
- platform: state
entity_id: group.all_devices
to: 'not_home'
action:
service: light.turn_off
entity_id: light.woonkamer
- alias: 'Light when i get home'
trigger:
- platform: state
entity_id: group.all_devices
to: 'home'
- platform: sun
event: sunset
- condition: state
entity_id: sun.sun
to: 'below_horizon'
action:
service: light.turn_on
entity_id: light.woonkamer
- alias: 'Light when i get home'
trigger:
- platform: state
entity_id: group.all_devices
to: 'home'
- platform: sun
event: sunset
condition:
condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
service: light.turn_on
entity_id: light.woonkamer
2017-08-09 22:26:02 ERROR (Thread-2) [homeassistant.util.yaml] mapping values are not allowed here
in "/home/homeassistant/.homeassistant/automation.yaml", line 18, column 14
2017-08-09 22:26:02 ERROR (MainThread) [homeassistant.components.automation] mapping values are not allowed here
in "/home/homeassistant/.homeassistant/automation.yaml", line 18, column 14
2017-08-09 22:26:02 ERROR (Thread-5) [homeassistant.util.yaml] mapping values are not allowed here
in "/home/homeassistant/.homeassistant/automation.yaml", line 18, column 14
2017-08-09 22:26:02 ERROR (MainThread) [homeassistant.components.group] mapping values are not allowed here
in "/home/homeassistant/.homeassistant/automation.yaml", line 18, column 14
2017-08-09 22:26:03 WARNING (MainThread) [homeassistant.components.media_player] Updating samsungtv media_player took longer than the scheduled update interval 0:00:10
2017-08-09 22:26:03 ERROR (Thread-6) [homeassistant.util.yaml] mapping values are not allowed here
in "/home/homeassistant/.homeassistant/automation.yaml", line 18, column 14
2017-08-09 22:26:03 ERROR (MainThread) [homeassistant.components] mapping values are not allowed here
in "/home/homeassistant/.homeassistant/automation.yaml", line 18, column 14