I’m running HA for years now, with no major problems, I guess it’s my turn.
Recently, I’ve changed some hardware - switched from Broadlink IR blaster / IR plug to Tuya Smart plug on 2 of my devices - 2 lights (hydroponics and aquarium).
configuration.yaml
light:
- platform: switch
name: Grow Light
# entity_id: switch.ir_plug_1
entity_id: switch.wifi_plug_2_socket_1
- platform: switch
name: Shrimp Light
# entity_id: switch.ir_plug_2
entity_id: switch.wifi_plug_3_socket_1
(old configuration is commented)
this is automation.yaml for Hydroponics. The other one for Aquarium is the same:
- id: '1614469556440'
alias: 'IR Plug #1 - Hidroponika Kitchen - OFF'
trigger:
- platform: time
at: '22:00:00'
condition: []
action:
- service: switch.turn_off
data: {}
target:
entity_id: switch.wifi_plug_2_socket_1
mode: single
- id: '1614469602693'
alias: 'IR Plug #1 - Hidroponika Kitchen - ON'
trigger:
- platform: time
at: 07:00:00
condition: []
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.wifi_plug_2_socket_1
mode: single
The problem is that this light (Hydroponics) is turning off by itself, few seconds after it turns on triggered by automation.
The log book says:
Wifi Plug #2 turned off
7:00:15 AM - 13 hours ago
Wifi Plug #2 turned on triggered by automation IR Plug #1 - Hidroponika Kitchen - ON triggered by time
7:00:03 AM - 13 hours ago
Also, when it fails like this and turns itself off, if I try to manually turn ON the light entity on dashboard the switch won’t “flip” (it goes straight back to off). The same is when I try to manually turn ON the switch entity on dashboard.
The question is what triggers switch to turn off?
The other (the same) automation for Aquarium works fine, this one also works fine after HA reset, and starts misbehaving again later.
Any ideas how to troubleshoot this?