I keep getting this when I check my configs:
invalid config for [automation]: expected dict for dictionary value @ data[‘action’][0][‘data’]. Got None. (See /config/configuration.yaml, line 130). Please check the docs at https://home-assistant.io/components/automation/
Here’s a #feature-requests: it would be great if it could tell me which line of code it doesn’t like in other yaml files.
Here’s my automation.yaml
- alias: Turn ON Office Lamp
trigger:
- platform: state
entity_id: switch.office_light
to: 'on'
from: 'off'
action:
- service: switch.turn_on
entity_id:
- switch.office_lamp
id: d6232569c62e46fa8298d1125a1f2758
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Turn OFF Office Lamp
trigger:
- platform: state
entity_id: switch.office_light
from: 'on'
to: 'off'
action:
- service: switch.turn_off
entity_id:
- switch.office_lamp
id: 4735be8e481d4feea57a10c7807963cd
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Turn on SHOP when there is movement
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_158d0001b1542d
to: 'on'
action:
- service: homeassistant.turn_on
entity_id: switch.shop
id: 37624b772cd840b79999710d5a61aa79
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Turn off SHOP lights when there is no movement
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_158d0001b1542d
to: 'off'
for:
minutes: 7
action:
- service: homeassistant.turn_off
entity_id: switch.shop
id: 5602ac6d92c44a5a92cb44542aecf6c7
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Button1 SINGLE - Mimi's lamp
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0002b21e06
click_type: single
action:
- service: switch.toggle
entity_id:
- switch.mimis_lamp
id: 1c1fcf3f76524d50acecbf362155ca5d
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Button1 DOUBLE - Turn off All lights
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0002b21e06
click_type: double
action:
- service: scene.turn_on
entity_id:
- scene.shutdown_the_house
id: 96abae425053457b8605c9484730ff65
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Button1 LONG - Bathroom Low Dim
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0002b21e06
click_type: long_click_press
condition:
condition: state
entity_id: light.07200106b4e62d27af19
state: 'off'
action:
- service: light.turn_on
entity_id: light.07200106b4e62d27af19
data:
brightness: 82
id: 8baa162d16214d5b94598216e77875fd
#=-=-=-=-=-=-=
- alias: Button1 LONG - Bathroom Off
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0002b21e06
click_type: long_click_press
condition:
condition: state
entity_id: light.07200106b4e62d27af19
state: 'on'
action:
- service: light.turn_off
entity_id: light.07200106b4e62d27af19
id: 0ab89ec18626458f941ed671d201bfc4
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Auto Patio Door lights
trigger:
- platform: state
entity_id: binary_sensor.door_window_sensor_158d0002c39a76
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: switch.back_yard_light
state: 'off'
- condition: state
entity_id: sun.sun
state: below_horizon
action:
- service: switch.turn_on
entity_id: switch.back_yard_light
- delay: 120
- service: switch.turn_off
entity_id: switch.back_yard_light
id: 61edf448ab8b40cdb2daf8cc981e3133
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Button1 LONG - Bathroom Low Dim
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0002b21e06
click_type: long_click_press
condition:
condition: state
entity_id: light.07200106b4e62d27af19
state: 'off'
action:
- service: light.turn_on
entity_id: light.07200106b4e62d27af19
data:
brightness: 82
id: 8baa162d16214d5b94598216e77875fd
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Button1 LONG - Bathroom Off
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0002b21e06
click_type: long_click_press
condition:
condition: state
entity_id: light.07200106b4e62d27af19
state: 'on'
action:
- service: light.turn_off
entity_id: light.07200106b4e62d27af19
id: 0ab89ec18626458f941ed671d201bfc4
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Button2 DOUBLE - Shutdown the House
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0002b221ef
click_type: double
action:
- service: scene.turn_on
entity_id:
- scene.shutdown_the_house
id: 76bb0bee05b74a52b4ece61783a326d0
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Turn ON Cabinet lights
trigger:
- platform: state
entity_id: light.07200106bcddc2efbb78
to: 'on'
from: 'off'
action:
- service: light.turn_on
entity_id: light.kitchen_cabinet
id: 94e919cfa62743bcb68594e56928d3b6
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Turn OFF Cabinet lights
trigger:
- platform: state
entity_id: light.07200106bcddc2efbb78
from: 'on'
to: 'off'
action:
- service: light.turn_off
entity_id:
- light.kitchen_cabinet
id: 014b122bc971496badeb9d6ab685db45
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Button2 SINGLE Dan's lamp
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0002b21ed7
click_type: single
action:
- service: switch.toggle
entity_id:
- switch.bed_room_lamp_dan
id: a679e347e7884d96906404f463a24bea
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Button2 DOUBLE - Shutdown the house
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0002b21ed7
click_type: double
action:
- service: scene.turn_on
entity_id:
- scene.shutdown_the_house
id: c2ac8b3638db4600a3fcf3588e2b54a3
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Turn off Humidifier in the morning
hide_entity: false
trigger:
platform: time
at: '5:15'
action:
service: homeassistant.turn_off
entity_id: switch.humidifier
id: e82249829b1940da83f9d39d68d73efb
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Button4 SINGLE Ceiling light
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d000288bc82
click_type: single
action:
- service: light.toggle
entity_id:
- light.dining_room_ceilling
id: e17c0251e4d346b4990fb556814bde76
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Button4 DOUBLE Living light
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d000288bc82
click_type: double
action:
- service: switch.toggle
entity_id:
- switch.living_room_light
id: afc8bda97d3c4d0abfb1b2088e66613d
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Button4 TRIPPLE Fireplace
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d000288bc82
click_type: triple
action:
- service: switch.toggle
entity_id:
- switch.fireplace
id: 4f36db46a65c496f971a03e6e9419998
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: enable flux on platform start
trigger:
- event: start
platform: homeassistant
id: 05db69317ac241d2ba47a8861aed6b62
action:
- data:
entity_id: switch.flux
service: switch.turn_on
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#- alias: AutoGarageDoor
# trigger:
# platform: state
# entity_id: switch.garage_door
# from: 'off'
# to: 'on'
# action:
# - delay: 1
# - service: switch.toggle
# entity_id:
# - switch.garage_door
# id: '155569234787773'
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Basement stairs - Auto Turn OFF lights
trigger:
- platform: state
entity_id: switch.basement_stairs
from: 'off'
to: 'on'
action:
- delay: 400
- service: homeassistant.turn_off
entity_id: switch.basement_stairs
id: 5602ac6d92c44a5a92c4545454b44542aecf6c7
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Flex auto turn on
trigger:
- platform: state
entity_id: switch.flux
from: 'on'
to: 'off'
action:
- service: homeassistant.turn_on
entity_id: switch.flux
id: 44602ac6d92c44a5a92c4545453d644542aecf6c
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- alias: Laundry Room - Auto Turn OFF lights
trigger:
- platform: state
entity_id: switch.laundry_room
from: 'off'
to: 'on'
action:
- delay: 900
- service: homeassistant.turn_off
entity_id: switch.laundry_room
id: 123602ac6d92c44a5h8545454b44542aecf65c
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-