I want to use my old automations with 0.45 but I can’t seem to get my config to be valid anymore. Can someone try and see what’s wrong with the following?
# ChromeCast_Paused #
- id: CC_pause
alias: "Chromecast paused/stopped"
trigger:
- platform: state
entity_id: media_player.cc_vardagsrum
state: 'idle'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
service: scene.turn_on
entity_id: scene.TV_pause
# ChromeCast_Playing #
- id: CC_play
alias: "Chromecast playing"
trigger:
- platform: state
entity_id: media_player.cc_vardagsrum
to: 'playing'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
service: scene.turn_on
entity_id: scene.TV_playing
# Alarm Clock Test #
- id: Väckarklocka_Tänd_lampa
alias: 'Väckarklocka - Tänd lampa'
hide_entity: False
trigger:
platform: template
value_template: '{{ states.sensor.time.state == states.sensor.alarm_clock_time_long.state }}'
condition:
condition: state
entity_id: input_boolean.alarm_clock_status
state: 'on'
action:
service: script.wake_up
# Lampor på vid solnedgång #
- id: Lampor_Solnedgång
alias: Lampor på vid solnedgång
initial_state: True
hide_entity: False
trigger:
platform: sun
event: sunset
offset: "-00:15:00"
action:
service: scene.turn_on
entity_id: scene.Lampor_Skymning
# Släck allt vid sängdags #
- id: Släck_allt_23:00
alias: Släck allt - sängdags
initial_state: True
hide_entity: False
trigger:
platform: time
after: "23:00"
action:
service: homeassistant.turn_off
entity_id: group.master
# Släck allt på morgonen #
- id: Släck_allt_morgon
alias: Släck allt - morgonen
initial_state: True
hide_entity: False
trigger:
platform: time
after: "07:30"
action:
service: homeassistant.turn_off
entity_id: group.master
#Tänd LED på PIR1 vid rörelse
- id: PIR1_MD
alias: On PIR1 Motion Light
trigger:
platform: state
entity_id: sensor.sn1_pir
state: 'motion detected'
action:
service: homeassistant.turn_on
entity_id: light.sn1_led
- id: PIR1_Standby
alias: Off PIR1 Motion Light
trigger:
platform: state
entity_id: sensor.sn1_pir
state: 'standby'
action:
service: homeassistant.turn_off
entity_id: light.sn1_led
#Tänd LED på PIR2 vid rörelse
- id: PIR2_M_D
alias: On PIR2 Motion Light
trigger:
platform: state
entity_id: sensor.sn2_pir
state: 'motion detected'
action:
service: homeassistant.turn_on
entity_id: light.sn2_led
- id: PID2_Standby
alias: Off PIR2 Motion Light
trigger:
platform: state
entity_id: sensor.sn2_pir
state: 'standby'
action:
service: homeassistant.turn_off
entity_id: light.sn2_led
#Tänd LED på PIR3 vid rörelse
- id: PID3_M_D
alias: Turn on PIR3 Motion Light
trigger:
platform: state
entity_id: sensor.sn3_pir
state: 'motion detected'
action:
service: homeassistant.turn_on
entity_id: light.sn3_led
- id: PIR3_Standby
alias: Off PIR3 Motion Light
trigger:
platform: state
entity_id: sensor.sn3_pir
state: 'standby'
action:
service: homeassistant.turn_off
entity_id: light.sn3_led
#Notifiera vid rörelse
- id: Motion_alarm
alias: Motion Alarm
trigger:
- platform: state
entity_id: sensor.sn1_pir
state: 'motion detected'
- platform: state
entity_id: sensor.sn2_pir
state: 'motion detected'
- platform: state
entity_id: sensor.sn3_pir
state: 'motion detected'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: homeassistant.turn_on
entity_id: group.pir_lights
- service: notify.huset
data:
message: "Rörelse i huset"
title: "Alarm Aktiverat"
Automations: The state trigger keyword state and the time trigger keyword after were deprecated in 0.46. They have now been removed. Use to and at instead. (@amelchio - #8510) (automation.state docs) (automation.time docs) (breaking change)
I’ve replaced state: with to: but still have errors.
Testing configuration at /home/homeassistant/.homeassistant
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up mqtt
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up logger
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain mqtt took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up http
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up recorder
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain logger took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up api
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up history
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up frontend
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up input_slider
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up discovery
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up notify
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up scene
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up input_boolean
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up tellduslive
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up sun
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up sensor
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up updater
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up group
2017-08-20 12:26:04 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘to’]. Got None
not a valid value for dictionary value @ data[‘condition’][0][‘condition’]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 154). Please check the docs at https://home-assistant.io/components/automation/
2017-08-20 12:26:04 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘to’]. Got None
not a valid value for dictionary value @ data[‘condition’][0][‘condition’]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 154). Please check the docs at https://home-assistant.io/components/automation/
2017-08-20 12:26:04 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘to’]. Got None
not a valid value for dictionary value @ data[‘condition’][0][‘condition’]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 154). Please check the docs at https://home-assistant.io/components/automation/
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain input_slider took 0.4 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.4 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain notify took 0.4 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain scene took 0.3 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain input_boolean took 0.3 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain tellduslive took 0.3 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.3 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.1 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.1 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.1 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up logbook
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up conversation
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up config
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up media_player
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up script
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up light
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setting up automation
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain media_player took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain light took 0.0 seconds.
2017-08-20 12:26:04 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.0 seconds.
Failed config
automation:
- action: [source /home/homeassistant/.homeassistant/automations.yaml:12]
entity_id: scene.TV_pause
service: scene.turn_on
alias: Chromecast paused/stopped
condition: [source /home/homeassistant/.homeassistant/automations.yaml:8]
- condition: state
entity_id: sun.sun
to: below_horizon
id: CC_pause
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:4]
- platform: state
entity_id: media_player.cc_vardagsrum
to: idle
- action: [source /home/homeassistant/.homeassistant/automations.yaml:27]
entity_id: scene.TV_playing
service: scene.turn_on
alias: Chromecast playing
condition: [source /home/homeassistant/.homeassistant/automations.yaml:23]
- condition: state
entity_id: sun.sun
to: below_horizon
id: CC_play
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:19]
- platform: state
entity_id: media_player.cc_vardagsrum
to: playing
- action: [source /home/homeassistant/.homeassistant/automations.yaml:42]
service: script.wake_up
alias: Väckarklocka - Tänd lampa
condition: [source /home/homeassistant/.homeassistant/automations.yaml:38]
condition: state
entity_id: input_boolean.alarm_clock_status
to: on
hide_entity: False
id: Väckarklocka_Tänd_lampa
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:35]
platform: template
value_template: {{ states.sensor.time.state == states.sensor.alarm_clock_time_long.state }}
- action: [source /home/homeassistant/.homeassistant/automations.yaml:54]
entity_id: scene.Lampor_Skymning
service: scene.turn_on
alias: Lampor på vid solnedgång
hide_entity: False
id: Lampor_Solnedgång
initial_state: True
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:50]
platform: sun
event: sunset
offset: -00:15:00
- action: [source /home/homeassistant/.homeassistant/automations.yaml:66]
entity_id: group.master
service: homeassistant.turn_off
alias: Släck allt - sängdags
hide_entity: False
id: Släck_allt_23:00
initial_state: True
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:63]
platform: time
at: 23:00
- action: [source /home/homeassistant/.homeassistant/automations.yaml:78]
entity_id: group.master
service: homeassistant.turn_off
alias: Släck allt - morgonen
hide_entity: False
id: Släck_allt_morgon
initial_state: True
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:75]
platform: time
at: 07:30
- action: [source /home/homeassistant/.homeassistant/automations.yaml:89]
entity_id: light.sn1_led
service: homeassistant.turn_on
alias: On PIR1 Motion Light
id: PIR1_MD
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:85]
platform: state
entity_id: sensor.sn1_pir
to: motion detected
- action: [source /home/homeassistant/.homeassistant/automations.yaml:99]
entity_id: light.sn1_led
service: homeassistant.turn_off
alias: Off PIR1 Motion Light
id: PIR1_Standby
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:95]
platform: state
entity_id: sensor.sn1_pir
to: standby
- action: [source /home/homeassistant/.homeassistant/automations.yaml:110]
entity_id: light.sn2_led
service: homeassistant.turn_on
alias: On PIR2 Motion Light
id: PIR2_M_D
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:106]
platform: state
entity_id: sensor.sn2_pir
to: motion detected
- action: [source /home/homeassistant/.homeassistant/automations.yaml:120]
entity_id: light.sn2_led
service: homeassistant.turn_off
alias: Off PIR2 Motion Light
id: PID2_Standby
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:116]
platform: state
entity_id: sensor.sn2_pir
to: standby
- action: [source /home/homeassistant/.homeassistant/automations.yaml:131]
entity_id: light.sn3_led
service: homeassistant.turn_on
alias: Turn on PIR3 Motion Light
id: PID3_M_D
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:127]
platform: state
entity_id: sensor.sn3_pir
to: motion detected
- action: [source /home/homeassistant/.homeassistant/automations.yaml:141]
entity_id: light.sn3_led
service: homeassistant.turn_off
alias: Off PIR3 Motion Light
id: PIR3_Standby
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:137]
platform: state
entity_id: sensor.sn3_pir
to: standby
- action: [source /home/homeassistant/.homeassistant/automations.yaml:168]
- entity_id: group.pir_lights
service: homeassistant.turn_on
- data: [source /home/homeassistant/.homeassistant/automations.yaml:172]
message: Rörelse i huset
title: Alarm Aktiverat
service: notify.huset
alias: Motion Alarm
condition: [source /home/homeassistant/.homeassistant/automations.yaml:158]
- condition: time
weekday: [source /home/homeassistant/.homeassistant/automations.yaml:160]
- mon
- tue
- wed
- thu
- fri
- sat
- sun
id: Motion_alarm
trigger: [source /home/homeassistant/.homeassistant/automations.yaml:148]
- platform: state
entity_id: sensor.sn1_pir
to: motion detected
- platform: state
entity_id: sensor.sn2_pir
to: motion detected
- platform: state
entity_id: sensor.sn3_pir
to: motion detected