Stavros
(Stavros McGillicuddy)
February 8, 2021, 10:57pm
1
What could be causing the Message malformed: extra keys not allowed @ data[‘action’][0][‘snapshot_entities’] error on my automation?
alias: Garage Overhead Door Open Red
description: ''
trigger:
- device_id: binary_sensor.garage_overhead
domain: binary_sensor
entity_id: binary_sensor.garage_overhead
platform: device
type: opened
condition: []
action:
- service: scene.create
data:
scene_id: scene.led_rope_light_garage_door_controlled
snapshot_entities:
- light.rope_lights
- service: light.turn_on
data:
entity_id: light.rope_lights
rgb_color: [255,0,0]
Indentation…
alias: Garage Overhead Door Open Red
trigger:
- device_id: binary_sensor.garage_overhead
domain: binary_sensor
entity_id: binary_sensor.garage_overhead
platform: device
type: opened
action:
- service: scene.create
data:
scene_id: led_rope_light_garage_door_controlled
snapshot_entities:
- light.rope_lights
- service: light.turn_on
data:
entity_id: light.rope_lights
rgb_color: [255,0,0]
Also you don’t include the scene.
bit on the scene id when you save it I don’t think so I’ve taken that off.
Stavros
(Stavros McGillicuddy)
February 8, 2021, 11:37pm
3
thanks @anon43302295 … No more errors
Are you able to help me with this?
I’m trying to save the state of my rope lights when my garage door
The firsts bit open the door set red works bu the close and restore only turns off the lights
alias: Garage Overhead Door Open Red
trigger:
- device_id: binary_sensor.garage_overhead
domain: binary_sensor
entity_id: binary_sensor.garage_overhead
platform: device
type: opened
action:
- service: scene.create
data:
scene_id: led_rope_light_garage_door_controlled
snapshot_entities:
- light.rope_lights
- service: light.turn_on
data:
entity_id: light.rope_lights
rgb_color: [255,0,0]
alias: Garage Door Closed Previous State
description: ''
trigger:
- device_id: binary_sensor.garage_overhead
domain: binary_sensor
entity_id: binary_sensor.garage_overhead
platform: device
type: not_opened
condition: []
action:
- service: scene.turn_on
data:
entity_id: scene.led_rope_light_garage_door_controlled
That looks right to me, any errors in the logs? Also are you sure that your triggers are right? You have entity_ids where device_ids should be.
Stavros
(Stavros McGillicuddy)
February 21, 2021, 9:52pm
5
Got it working… Here is the final result
alias: Garage Overhead Door Open Red
description: ''
trigger:
- platform: state
entity_id: binary_sensor.garage_overhead
to: 'on'
condition: []
action:
- service: scene.create
data:
scene_id: snapshot_rope_lights
snapshot_entities:
- light.rope_lights
- service: light.turn_on
data:
entity_id: light.rope_lights
rgb_color:
- 255
- 0
- 0
mode: single
alias: Garage Overhead Door Closed Previous
description: ''
trigger:
- platform: state
entity_id: binary_sensor.garage_overhead
from: 'on'
to: 'off'
condition: []
action:
- service: scene.turn_on
data:
entity_id: scene.snapshot_rope_lights
mode: single