I want to control 2 hue lights with a switch connected to a shelly 1. I use the binary sensor on/off from the shelly 1 as the trigger (the switch input from the shelly is detached fro the output relay). I want the lights to have a different brightness overday then overnight, herefore I created a day and night scene.
So I made 3 different automations with the same triggers but different conditions:
- id: '1591709584039'
alias: schakelaar eetkamer dag aan
description: ''
trigger:
- device_id: 7134c5268f7748818bb5667dcf1c61af
domain: binary_sensor
entity_id: binary_sensor.shelly_shsw_1_f394bc_switch
platform: device
type: turned_on
- device_id: 7134c5268f7748818bb5667dcf1c61af
domain: binary_sensor
entity_id: binary_sensor.shelly_shsw_1_f394bc_switch
platform: device
type: turned_off
condition:
- condition: device
device_id: 69a64803b3b048e2a17fc657771386fa
domain: light
entity_id: light.eetkamer_lamp_1
type: is_off
- condition: and
conditions:
- condition: device
device_id: 5458656273f043d4baced937c2505b4c
domain: light
entity_id: light.eetkamer_lamp_2
type: is_off
- after: sunrise
before: sunset
condition: sun
action:
- scene: scene.eetkamer_dag
- id: '1591726413131'
alias: schakelaar eetkamer uit
description: ''
trigger:
- device_id: 7134c5268f7748818bb5667dcf1c61af
domain: binary_sensor
entity_id: binary_sensor.shelly_shsw_1_f394bc_switch
platform: device
type: turned_on
- device_id: 7134c5268f7748818bb5667dcf1c61af
domain: binary_sensor
entity_id: binary_sensor.shelly_shsw_1_f394bc_switch
platform: device
type: turned_off
condition:
- condition: or
conditions:
- condition: device
device_id: 69a64803b3b048e2a17fc657771386fa
domain: light
entity_id: light.eetkamer_lamp_1
type: is_on
- condition: or
conditions:
- condition: device
device_id: 5458656273f043d4baced937c2505b4c
domain: light
entity_id: light.eetkamer_lamp_2
type: is_on
action:
- device_id: 69a64803b3b048e2a17fc657771386fa
domain: light
entity_id: light.eetkamer_lamp_1
type: turn_off
- device_id: 5458656273f043d4baced937c2505b4c
domain: light
entity_id: light.eetkamer_lamp_2
type: turn_off
- id: '1591726962429'
alias: schakelaar eetkamer nacht
description: ''
trigger:
- device_id: 7134c5268f7748818bb5667dcf1c61af
domain: binary_sensor
entity_id: binary_sensor.shelly_shsw_1_f394bc_switch
platform: device
type: turned_on
- device_id: 7134c5268f7748818bb5667dcf1c61af
domain: binary_sensor
entity_id: binary_sensor.shelly_shsw_1_f394bc_switch
platform: device
type: turned_off
condition:
- condition: device
device_id: 69a64803b3b048e2a17fc657771386fa
domain: light
entity_id: light.eetkamer_lamp_1
type: is_off
- condition: and
conditions:
- condition: device
device_id: 5458656273f043d4baced937c2505b4c
domain: light
entity_id: light.eetkamer_lamp_2
type: is_off
- after: sunset
before: sunrise
condition: sun
action:
- scene: scene.eetkamer_nacht
Overday the automation works as expected. After sunset it does nothing. And the automation for switching off the lights only works when both lamps are on.
When I trigger the automations from the GUI they all work as expected.
What is going wrong?
Or can I only do this with scripts? (I am a homeassistant noob so I have no experience at all with scripts)