I’ve been having issues with one of my Broadlink TC2 switches recently. I have a simple automation triggered by sunset to turn on an outdoor light and send a notification.
# Lighting Automation - Alfresco Light at Sunset
- alias: 'Alfresco light on at sunset'
trigger:
platform: sun
event: sunset
action:
- service: homeassistant.turn_on
entity_id: switch.alfresco_light
- service: notify.notify
data:
message: "The alfresco light is now on"
This used to work reliably but now it seems to not trigger. Triggering the automation manually shortly after the desired trigger works fine.
Today during the day I decided to try and turn on the alfresco light manually though my lighting dashboard and it didn’t trigger. So I turned it off and turned it on again and it worked the second time around.
- platform: broadlink
host: 192.168.0.145
mac: '0D:43:B4:CA:BB:BD'
timeout: 15
switches:
alfresco_light:
friendly_name: "Alfresco Light"
command_on: '6QpCAN8JCRYWCQkWFgkWCRYJFgkJFgkWFgkJFgkWFgkJFgkWFgkJFgkWFgkWCRYJCRYWCQkWCRYJFgkWFgkJFhYJFgkJFg=='
command_off: '6QpCAN8JFgkWCRYJCRYJFhYJFgkWCQkWFgkWCRYJCRYJFhYJFgkJFhYJFgkJFgkWCRYJFhYJFgkWCQkWFgkWCRYJCRYJFg=='
I have also just recently grabbed the HEX codes from the Broadlink app again and copied them into my switches.yaml but it’s exactly the same code. I have not yet tried to remove and relearn the TC2 switch from the Broadlink app and try to grab the codes again, this would be my next step.
Has anyone faced this at all? It seems to only be after the switch has been idle for some time?
Thanks in advance.