I need some help debugging a specific hiccup I have with one light used in a scene. Basically, I have automation set up that if the garage door is opened and the kitchen light is below a certain value, then raise the brightness to a specific value for 5 minutes, then go back to the prior brightness.
This automation also turns on the garage lights and others, which work perfectly as they are simple on/off switches for the lights. When I trigger the automation, I create a scene and snapshot the entities. This seemingly works, then I raise the brightness, and when the time comes, I activate the scene.
Now here’s the rub, this particular light supports color warmth and RGB. When I create a scene on it and then activate the scene, it is changing the light from a warm white to a purple. I figure the device is being particular to some of the attributes being saved in the scene. I am trying to figure out a way to tweak the scene or store the value in a script variable for use later. Anyone have thoughts on how to handle a scenario light this?
Here is my automation:
alias: Brighten Kitchen when Garage Door opens
description: ""
triggers:
- type: opened
device_id: fcab010312600d5ef286c0491392698f
entity_id: d1ea386c68ef8000748bf5300adc720a
domain: binary_sensor
trigger: device
- type: motion
device_id: b01c7645c036b625f4f60839735a24d4
entity_id: c3a3f186ac2da0b6431e58fc247c8aba
domain: binary_sensor
trigger: device
- type: motion
device_id: 09c8a7623f5b9e199d38d4b950d9efe4
entity_id: ff053c3237531804e02332958f8763b8
domain: binary_sensor
trigger: device
conditions:
- condition: and
conditions:
- condition: device
type: is_off
device_id: 66481397c5fcb262ccfe086b3286618e
entity_id: 16689c96c4685a43c9605f37bb8212d3
domain: light
- condition: device
type: is_off
device_id: 66481397c5fcb262ccfe086b3286618e
entity_id: 0291a42c1da93499748e144410093eda
domain: switch
- condition: device
type: is_on
device_id: f6a52b0935a6e7cb02ac1f337d5aa030
entity_id: 6a152c0d457d4bcc40a47e1c49075f49
domain: light
- condition: or
conditions:
- condition: sun
after: sunset
after_offset: "-01:30"
- condition: sun
before: sunrise
before_offset: "00:45"
actions:
- data:
scene_id: garage_door_open_revert
snapshot_entities:
- light.kitchen_sink_light
- light.kitchen_garage_smart_relay_l1
- light.kitchen_garage_smart_relay_l2
action: scene.create
- if:
- condition: numeric_state
entity_id: light.kitchen_sink_light
below: 127
attribute: brightness
then:
- target:
entity_id:
- light.kitchen_sink_light
data:
brightness_pct: 50
action: light.turn_on
- data: {}
action: light.turn_on
target:
entity_id:
- light.kitchen_garage_smart_relay_l2
- light.kitchen_garage_smart_relay_l1
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- data:
entity_id: scene.garage_door_open_revert
action: scene.turn_on
- target:
entity_id:
- scene.garage_door_open_revert
device_id: []
area_id: []
data: {}
action: scene.delete
mode: single