Closed kozfelipe closed 1 year ago
The error suggests that the switch rebooted. Are you connecting the switch to a fan (inductive load) instead of light bulb (resistive load)?
It will resync after about 5 minutes?
It is a light bulb load. Isn't 5 min too long?
It is controled by the parameter SCAN_INTERVAL = timedelta(seconds=240)
You could adjust this parameters. I'm not using the physical and hass at the same time that often so it does not bother me.
But your problem may come from a loose connection between cables since switching should not disconnect the device.
SCAN_INTERVAL from custom_components/cozylife/light.py right? I will tweak it later, thanks
SCAN_INTERVAL from custom_components/cozylife/light.py right? I will tweak it later, thanks
Sorry, I made a mistake. It depends. If you treat the "physical switch" as a hass light in the yaml config file, then, we need to look at the SWITCH_SCAN_INTERVAL in light.py which is 20 seconds now. If we treat the "physical switch" as a hass switch, we need to look at the SCAN_INTERVAL in switch.py.
yes it is configured as light
light:
- platform: cozylife
lights:
- ip: 192.168.0.16
did: 69965988249494ab272d
pid: p93sfg
dmn: Smart Bulb Light
dpid: [1, 2, 3, 4, 5, 7, 8, 9, 13, 14]
yes it is configured as light
light: - platform: cozylife lights: - ip: 192.168.0.16 did: 69965988249494ab272d pid: p93sfg dmn: Smart Bulb Light dpid: [1, 2, 3, 4, 5, 7, 8, 9, 13, 14]
You probably do not need to do anything then. Do you get response in about 20 seconds?
I will use this light in a room that does not need a switch as you described, thanks
Everytime someone uses the actual physical switch it get lost in synchronization