Hi Guys and Girls!
Background
I am fairly new to HA and need some help with an automation that I just cannot get to work!
I have a table light in the cellar that turns on at sun set and off at 23:30 CET. I control the table light with a Tuya on/off switch (a little puck, but I just put it on the lamp cable), hereafter “Tuya On/Off”.
In the same room I have a smart ceiling light. In my house its “Dimmable light 8”. Its controlled with normal buttons.
My automation
When I turn on “Dimmable light 8”, I want “Tuya On/Off” to turn off. And when I turn off “Dimmable light 8” after sunset, I want “Tuya On/Off” to turn on.
Why? The table lamp has a soft light and the ceiling light is fairly strong, no reason to have the table light on when the ceiling light is on.
Turn on Tuya On/Off:
alias: Belysning källare
description: ''
trigger:
- platform: sun
event: sunset
condition: []
action:
- type: turn_on
device_id: 4a3058719dfc20a56b9b58997c1b4dff
entity_id: switch.bf78728d3b9fa444466mos
domain: switch
mode: single
Turn off Tuya On/Off when Dimmable Light 8 is turned on:
alias: Belysning källare mod 1
description: ''
trigger:
- platform: device
type: turned_on
device_id: 7752e160276fa54c96ec7f1df19fbfe2
entity_id: light.dimmable_light_8
domain: light
condition: []
action:
- type: turn_off
device_id: 4a3058719dfc20a56b9b58997c1b4dff
entity_id: switch.bf78728d3b9fa444466mos
domain: switch
mode: single
Turn on Tuya On/Off when Dimmable Light 8 is turned off:
alias: Belysning källare mod 2
description: ''
trigger:
- platform: device
type: turned_off
device_id: 7752e160276fa54c96ec7f1df19fbfe2
entity_id: light.dimmable_light_8
domain: light
condition:
- condition: time
after: '18:30'
- condition: time
before: '23:30'
action:
- type: turn_on
device_id: 4a3058719dfc20a56b9b58997c1b4dff
entity_id: switch.bf78728d3b9fa444466mos
domain: switch
mode: single
What happens?
The first time Tuya On/Off turned off when I lit Dimmable Light 8. But after that it has basically not worked. I’ve not managed to get it to turn on again when I turn off Dimmable Light 8.
The odd thing is, this is how it looks under info for my automation to turn off Tuya On/Off when I turn on Dimmable Light 8:
Its Swedish for “Turned off” then “Became unavailable” and then “Turned on” – all during the same second??
And what does it mean when this is stated in regards to the Automation?
The Trace Timeline for the automation says nothing and Tuya On/Off show no change.
Anyone have any idea what this could be about??