hi…im new hassio just writen some basic code for my door sernsors and light bulb and its giving me this error can ayone please guide me whats the issue…? whats in line 13 can’t see anything wrong
Invalid config for [automation]: [condition] is an invalid option for [automation]. Check: automation->trigger->0->condition. (See /config/configuration.yaml, line 13). Please check the docs at https://home-assistant.io/components/automation/
Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘for’]. Got None
extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘from’]. Got None
extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘to’]. Got None
not a valid value for dictionary value @ data[‘condition’][0][‘conditions’][0][‘condition’]. Got None. (See /config/configuration.yaml, line 13). Please check the docs at
Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘for’]. Got None
extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘from’]. Got None
extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘to’]. Got None
not a valid value for dictionary value @ data[‘condition’][0][‘conditions’][0][‘condition’]. Got None. (See /config/configuration.yaml, line 13). Please check the docs at
- alias: If the Door opens and motion detected on motion sensor"1" or "2" turn On the lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396a32c
from: 'off'
to: 'on'
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
to: 'on'
- condition: state
entity_id: binary_sensor.motion_sensor_158d00039571f9
to: 'on'
action:
service: light.turn_on
entity_id: light.ceiling_light_1
- alias: If the Door is Closed and no motion detected turn Off the lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396a32c
from: 'on'
to: 'off'
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
from: 'on'
to: 'off'
for: '00:02:00'
- condition: state
entity_id: binary_sensor.motion_sensor_158d00039571f9
from: on
to: 'off'
for: '00:02:00'
action:
service: light.turn_off
entity_id: light.ceiling_light_1
- alias: If the bathroom Door opens turn On the bathroom lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396bbb9
from: 'off'
to: 'on'
action:
service: light.turn_on
entity_id: light.xiaomi_philips_smart_led_ball_2
- alias: If the bathroom Door closes and motion detected on sensor 2 for 05 minute turn off the bathroom lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396bbb9
from: 'on'
to: 'off'
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
from: 'off'
to: 'on'
for: '00:05:00'
action:
service: light.turn_off
entity_id: light.xiaomi_philips_smart_led_ball_2
````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
condition:
condition: state
entity_id: device_tracker.paulus
state: 'not_home'
# optional: trigger only if state was this for last X time.
for:
hours: 1
minutes: 10
seconds: 5
It continues to say the issue is on line 13 - I have seen your previous post on this issue where you were getting help.
Looking at the automation documents, it looks like you still have indentation problems (I know you fixed some already).
This:
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
to: 'on'
- condition: state
entity_id: binary_sensor.motion_sensor_158d00039571f9
to: 'on'
Should be this (if I am reading the documents correctly):
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
to: 'on'
- condition: state
entity_id: binary_sensor.motion_sensor_158d00039571f9
to: 'on'
The actual condition list was not indented enough.
Change your automation to make the conditions " state: ‘on’ " rather than " to: ‘on’ ". The condition is about the sensors BEING IN THAT STATE, not MOVING to that state.
Here you go, this passes the configuration check:
- alias: If the Door opens and motion detected on motion sensor"1" or "2" turn On the lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396a32c
to: 'on'
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
state: 'on'
- condition: state
entity_id: binary_sensor.motion_sensor_158d00039571f9
state: 'on'
action:
service: light.turn_on
entity_id: light.ceiling_light_1
You also don’t need the " from: ‘off’ " in the trigger, because a binary sensor can only have two states, if it’s already ‘on’ it won’t trigger, so the only way it can trigger is to be coming from ‘off’.
hi…im new hassio just writen some basic code for my door sernsors and light bulb and its giving me this error can ayone please guide me whats the issue…?
Invalid config for [automation]: [condition] is an invalid option for [automation]. Check: automation->trigger->0->condition. (See /config/configuration.yaml, line 13). Please check the docs at https://home-assistant.io/components/automation/
Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘for’]. Got None
extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘from’]. Got None
extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘to’]. Got None
not a valid value for dictionary value @ data[‘condition’][0][‘conditions’][0][‘condition’]. Got None. (See /config/configuration.yaml, line 13). Please check the docs at
Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘for’]. Got None
extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘from’]. Got None
extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘to’]. Got None
not a valid value for dictionary value @ data[‘condition’][0][‘conditions’][0][‘condition’]. Got None. (See /config/configuration.yaml, line 13). Please check the docs at
- alias: If the Door opens and motion detected on motion sensor"1" or "2" turn On the lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396a32c
from: 'off'
to: 'on'
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
to: 'on'
- condition: state
entity_id: binary_sensor.motion_sensor_158d00039571f9
to: 'on'
action:
service: light.turn_on
entity_id: light.ceiling_light_1
- alias: If the Door is Closed and no motion detected turn Off the lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396a32c
from: 'on'
to: 'off'
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
from: 'on'
to: 'off'
for: '00:02:00'
- condition: state
entity_id: binary_sensor.motion_sensor_158d00039571f9
from: on
to: 'off'
for: '00:02:00'
action:
service: light.turn_off
entity_id: light.ceiling_light_1
- alias: If the bathroom Door opens turn On the bathroom lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396bbb9
from: 'off'
to: 'on'
action:
service: light.turn_on
entity_id: light.xiaomi_philips_smart_led_ball_2
- alias: If the bathroom Door closes and motion detected on sensor 2 for 05 minute turn off the bathroom lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396bbb9
from: 'on'
to: 'off'
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
from: 'off'
to: 'on'
for: '00:05:00'
action:
service: light.turn_off
entity_id: light.xiaomi_philips_smart_led_ball_2
Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘to’]. Got None
not a valid value for dictionary value @ data[‘condition’][0][‘conditions’][0][‘condition’]. Got None. (See /config/configuration.yaml, line 13). Please check the docs at https://home-assistant.io/components/automation/
Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘for’]. Got None
extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘from’]. Got None
extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘to’]. Got None
not a valid value for dictionary value @ data[‘condition’][0][‘conditions’][0][‘condition’]. Got None. (See /config/configuration.yaml, line 13). Please check the docs at https://home-assistant.io/components/automation/
Invalid config for [automation]: [conditions] is an invalid option for [automation]. Check: automation->trigger->0->conditions. (See /config/configuration.yaml, line 13)
Exactly what @123 said… post the code with the changes you made… that error is basically still telling us the condition is indented farther than it should be most likely.
Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘to’]. Got None not a valid value for dictionary value @ data[‘condition’][0][‘conditions’][0][‘condition’]. Got None. (See /config/configuration.yaml, line 13). Please check the docs atInvalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘for’]. Got None extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘from’]. Got None extra keys not allowed @ data[‘condition’][0][‘conditions’][0][‘to’]. Got None not a valid value for dictionary value @ data[‘condition’][0][‘conditions’][0][‘condition’]. Got None. (See /config/configuration.yaml, line 13). Please check the docs at https://home-assistant.io/components/automation/ Invalid config for [automation]: [conditions] is an invalid option for [automation]. Check: automation->trigger->0->conditions. (See /config/configuration.yaml, line 13).
- alias: If the Door opens and motion detected on motion sensor"1" or "2" turn On the lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396a32c
from: 'off'
to: 'on'
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
to: 'on'
- condition: state
entity_id: binary_sensor.motion_sensor_158d00039571f9
to: 'on'
action:
service: light.turn_on
entity_id: light.ceiling_light_1
- alias: If the Door is Closed and no motion detected turn Off the lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396a32c
from: 'on'
to: 'off'
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
from: 'on'
to: 'off'
for: '00:02:00'
- condition: state
entity_id: binary_sensor.motion_sensor_158d00039571f9
from: on
to: 'off'
for: '00:02:00'
action:
service: light.turn_off
entity_id: light.ceiling_light_1
- alias: If the bathroom Door opens turn On the bathroom lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396bbb9
from: 'off'
to: 'on'
action:
service: light.turn_on
entity_id: light.xiaomi_philips_smart_led_ball_2
- alias: If the bathroom Door closes and motion detected on sensor 2 for 05 minute turn off the bathroom lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396bbb9
from: 'on'
to: 'off'
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
from: 'off'
to: 'on'
for: '00:05:00'
action:
service: light.turn_off
entity_id: light.xiaomi_philips_smart_led_ball_2
Please try to keep to a single topic - starting another with this same issue leads to tracking issues for resolution… I have replied back with what I believe is the error in line 13 of your automation in the other post you started.
Line 13 indentation is wrong - indent 2 more spaces for the actual conditions.
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
to: 'on'
- condition: state
entity_id: binary_sensor.motion_sensor_158d00039571f9
to: 'on'
The issue isn’t indentation.
The issue is that while triggers are about state CHANGES, conditions are about CURRENT STATE.
Change your automation to make the conditions " state: ‘on’ " rather than " to: ‘on’ ". The condition is about the sensors BEING IN THAT STATE, not MOVING to that state.
Here you go, this passes the configuration check:
- alias: If the Door opens and motion detected on motion sensor"1" or "2" turn On the lights
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000396a32c
to: 'on'
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.motion_sensor_158d0003d19463
state: 'on'
- condition: state
entity_id: binary_sensor.motion_sensor_158d00039571f9
state: 'on'
action:
service: light.turn_on
entity_id: light.ceiling_light_1
You also don’t need the " from: ‘off’ " in the trigger, because a binary sensor can only have two states, if it’s already ‘on’ it won’t trigger, so the only way it can trigger is to be coming from ‘off’.
Sure it was. It said so in the very first error message. It was unable to recognize the condition as a valid option. That one definitely needed to be cleared by correcting the indentation.
But, as we all know, that wasn’t the only error message. There were many others including, as you pointed out, the use of invalid options within the condition. That error was also spelled out in the first post (extra keys not allowed).
I opted out after 3 strikes:
not seeing any updated code, just error messages and pleading for help
creation of a parallel topic
receiving an odd Private Message
The author of this topic ought to read the following:
yes bro you are very right, i must have violated some terms and conditions of the forum and i regret that, one thing i get that have to improve my basics of coding in order to get any technical help from here.
Creation of parallel topics: it was because i didn’t knew how this forum works, seen people are asking for help every second the i thought my topic must have fallen under and no one will be able to scroll down to that to get replies to solve my issue.
In private message i just tried to get to you to bring into your knowledge that i corrected the code you suggested but it didn’t work, and i was not aware that i have to post updated code every time so just shared the logs until someone asked for code. Anything odd in the private message i didn’t think so.
Although i have violated terms & conditions of forum and for that i regret again.
Please accept my apology for today, next time i’ll be very careful while asking here and please don’t judge me for today’s discussion. I’m just a newbie knows nothing about coding.