I recently installed a Shelly 2 DImmer. My plan is to have the lights come on at 20% when the switch is turned on if the house is in “sleep mode”. I’ve set night mode based on a toggle helper. The lights come on just fine, but it never goes to the dimmer value if night mode is on.
I’ve tried this three different ways. The first way was to look for the state change of the lights and then run a scene accordingly. The second was also looking for the state change, but actually triggered the action to turn on the lights and set the brightness. The third way was also looking for the state change of the switch and setting the action to turn the lights on and setting the brightness.
(Note: I didn’t have all three of these enabled simultaneously. I tried each one while disabling the others)
If I fire the scenes individually they work as intended. I’m obviously missing something here but I can’t quite figure out why it’s not running the automation correctly. Is this something that I need to do in Node Red vs an Automation?
alias: Master Bath Lights Mode
description: ''
trigger:
- platform: state
entity_id: light.master_bath_lights
from: 'Off'
to: 'On'
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.night_mode
state: 'Off'
sequence:
- scene: scene.master_bath_day_mode
- conditions:
- condition: state
entity_id: input_boolean.night_mode
state: 'On'
sequence:
- scene: scene.master_bath_night_mode
default: []
mode: single
alias: Master Bath Lights Mode Test 2
description: ''
trigger:
- platform: device
type: turned_on
device_id: 9946cd9296c34eba4182efe456c396d4
entity_id: light.master_bath_lights
domain: light
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.night_mode
state: 'Off'
sequence:
- scene: scene.master_bath_day_mode
- conditions:
- condition: state
entity_id: input_boolean.night_mode
state: 'On'
sequence:
- scene: scene.master_bath_night_mode
default: []
mode: single
alias: Master Bath Lights Mode Test 3
description: ''
trigger:
- platform: device
type: turned_on
device_id: 9946cd9296c34eba4182efe456c396d4
entity_id: light.master_bath_lights
domain: light
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.night_mode
state: 'Off'
sequence:
- type: turn_on
device_id: 9946cd9296c34eba4182efe456c396d4
entity_id: light.master_bath_lights
domain: light
brightness_pct: 100
- conditions:
- condition: state
entity_id: input_boolean.night_mode
state: 'On'
sequence:
- type: turn_on
device_id: 9946cd9296c34eba4182efe456c396d4
entity_id: light.master_bath_lights
domain: light
brightness_pct: 20
default: []
mode: single