Hi all
I was receiving errors in the log about my SmartThings token so I generated a new one and re-added via the GUI. Before I did this I got errors in the UI where I’d added ST devices to Lovelace cards (because HA couldn’t communicate with ST).
After re-adding the Lovelace cards are all working again. Going in to Automations (in the GUI) shows all of my automations, clicking into them, all references to ST devices (sensors, lights, switches) are blank. Any references to other integrations are fine.
I tried creating a new automation in the GUI and looking at the YAML this created the device names are all the same. I’ve written all of the automations manually in YAML. After reviewing the code it seems all my automations have a device_id property:
- id: 'auto-motion-bedmain-on'
alias: Motion - Bedroom Main Light On
description: ''
trigger:
- device_id: 1dfdcf440a8942e78a5e33aea366048a
domain: binary_sensor
entity_id: binary_sensor.bedroom_sensor_motion
platform: device
type: motion
condition:
- before: '20:00'
condition: time
- condition: state
entity_id: input_select.house_mode
state: Home-Evening
action:
- device_id: a48f378c87264a30969f97975145c024
domain: light
entity_id: light.bedroom_main_light
type: turn_on
If I change to:
- id: 'auto-motion-bedmain-on'
alias: Motion - Bedroom Main Light On
description: ''
trigger:
- entity_id: binary_sensor.bedroom_sensor_motion
domain: binary_sensor
platform: device
type: motion
condition:
- before: '20:00'
condition: time
- condition: state
entity_id: input_select.house_mode
state: Home-Evening
action:
- entity_id: light.bedroom_main_light
domain: light
type: turn_on
then I get errors in the log:
Invalid config for [automation]: extra keys not allowed @ data['action'][0]['domain']. Got None
extra keys not allowed @ data['action'][0]['type']. Got None
required key not provided @ data['trigger'][0]['device_id']. Got None. (See /config/configuration.yaml, line 48). Please check the docs at https://home-assistant.io/integrations/automation/
I can’t seem to find the “device_id” for any of my devices and to be honest I’d rather use the “entity_id” anyway.
Does anyone have any ideas?