Hallo Cogniscenti!
I have a small bruise on my forehead from trying to work out what I am doing wrong here. I have run the whole of this automation.yaml through YAMLlint and I get the green OK. But when I reload HA I get the following error message:
Apr 12 23:48:25 hassbian2 hass[1067]: 2019-04-12 23:48:25 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: extra keys not allowed @ data['condition'][0]['conditions'][0]['conditions'][1]['option']. Got None
Apr 12 23:48:25 hassbian2 hass[1067]: not a valid value for dictionary value @ data['condition'][0]['conditions'][0]['conditions'][1]['condition']. Got None. (See /home/homeassistant/.homeassistant/automations.yaml, line 14). Please check the docs at https://home-assistant.io/component/automation/
I have an input_select for each day of the week. The drop down list for each day consists of âstandardâ, âshortâ and âlongâ:
pool_pump_mon:
name: Pool pump Mon
options:
- Standard
- Short
- Long
initial: Standard
icon: mdi:calendar-today
Here is the automation.yaml - any suggestions on what I am doing wrong, or a better way to do it would be much appreciated:
#Pool pump turns off at the same time every day - independent of input_select
- alias: "Pool pump timer off"
trigger:
platform: time
at: '19:00:00'
action:
- service: switch.turn_off
data:
entity_id: switch.fibaro_system_fgs213_switch_switch_2
- service: notify.paul_dev_email
data:
title: 'Bownham House Notification'
message: 'Pool pump turned off'
- alias: Set Pool Pump Short Duration
trigger:
platform: time
at: '18:00:00'
condition:
condition: or
conditions:
- condition: and
conditions:
- condition: time
weekday: mon
- condition: state
entity_id: input_boolean.pool_pump_mon
option: 'short'
- condition: and
conditions:
- condition: time
weekday: tue
- condition: state
entity_id: input_boolean.pool_pump_tue
option: 'short'
- condition: and
conditions:
- condition: time
weekday: wed
- condition: state
entity_id: input_boolean.pool_pump_wed
option: 'short'
- condition: and
conditions:
- condition: time
weekday: thu
- condition: state
entity_id: input_boolean.pool_pump_thu
option: 'short'
- condition: and
conditions:
- condition: time
weekday: fri
- condition: state
entity_id: input_boolean.pool_pump_fri
option: 'short'
- condition: and
conditions:
- condition: time
weekday: sat
- condition: state
entity_id: input_boolean.pool_pump_sat
option: 'short'
- condition: and
conditions:
- condition: time
weekday: sun
- condition: state
entity_id: input_boolean.pool_pump_sun
option: 'short'
action:
- service: switch.turn_on
data:
entity_id: switch.fibaro_system_fgs213_switch_switch_2
- service: notify.paul_dev_email
data:
title: 'Bownham House Notification'
message: 'Pool pump turned on - short pump day'
- alias: Set Pool Pump Long Duration
trigger:
platform: time
at: '12:00:00'
condition:
condition: or
conditions:
- condition: and
conditions:
- condition: time
weekday: mon
- condition: state
entity_id: input_boolean.pool_pump_mon
option: 'long'
- condition: and
conditions:
- condition: time
weekday: tue
- condition: state
entity_id: input_boolean.pool_pump_tue
option: 'long'
- condition: and
conditions:
- condition: time
weekday: wed
- condition: state
entity_id: input_boolean.pool_pump_wed
option: 'long'
- condition: and
conditions:
- condition: time
weekday: thu
- condition: state
entity_id: input_boolean.pool_pump_thu
option: 'long'
- condition: and
conditions:
- condition: time
weekday: fri
- condition: state
entity_id: input_boolean.pool_pump_fri
option: 'long'
- condition: and
conditions:
- condition: time
weekday: sat
- condition: state
entity_id: input_boolean.pool_pump_sat
option: 'long'
- condition: and
conditions:
- condition: time
weekday: sun
- condition: state
entity_id: input_boolean.pool_pump_sun
option: 'long'
action:
- service: switch.turn_on
data:
entity_id: switch.fibaro_system_fgs213_switch_switch_2
- service: notify.paul_dev_email
data:
title: 'Bownham House Notification'
message: 'Pool pump turned on - long pump day'
- alias: Set Pool Pump Standard Duration
trigger:
platform: time
at: '14:30:00'
condition:
condition: or
conditions:
- condition: and
conditions:
- condition: time
weekday: mon
- condition: state
entity_id: input_boolean.pool_pump_mon
option: 'standard'
- condition: and
conditions:
- condition: time
weekday: tue
- condition: state
entity_id: input_boolean.pool_pump_tue
option: 'standard'
- condition: and
conditions:
- condition: time
weekday: wed
- condition: state
entity_id: input_boolean.pool_pump_wed
option: 'standard'
- condition: and
conditions:
- condition: time
weekday: thu
- condition: state
entity_id: input_boolean.pool_pump_thu
option: 'standard'
- condition: and
conditions:
- condition: time
weekday: fri
- condition: state
entity_id: input_boolean.pool_pump_fri
option: 'standard'
- condition: and
conditions:
- condition: time
weekday: sat
- condition: state
entity_id: input_boolean.pool_pump_sat
option: 'standard'
- condition: and
conditions:
- condition: time
weekday: sun
- condition: state
entity_id: input_boolean.pool_pump_sun
option: 'standard'
action:
- service: switch.turn_on
data:
entity_id: switch.fibaro_system_fgs213_switch_switch_2
- service: notify.paul_dev_email
data:
title: 'Bownham House Notification'
message: 'Pool pump turned on - standard pump day'