XiaomiGateway3 icon indicating copy to clipboard operation
XiaomiGateway3 copied to clipboard

Light status on HA changes automatically without really affecting the lamp

Open macming opened this issue 9 months ago • 6 comments

Hello, I've encountered the same problem as #1335 on my custom mesh lamp after I updated to v4.0.5, restore the light.py file from v4.0.4 can solved the problem perfectly. How to resolve the conflict between different versions?Many thanks!

Here's my xiaomi_gateway3.py:

from custom_components.xiaomi_gateway3.core.devices import *

DEVICES = [{
    9754: ["Panasonic", "Floor Lamp", "HHTS2001W"],
    "spec": [
        BaseConv("light", "light", mi="2.p.1"),
        BrightnessConv("brightness", mi="2.p.2"),
        ColorTempKelvin("color_temp", mi="2.p.3"),
    ],
}] + DEVICES

macming avatar May 08 '24 13:05 macming

I have the same problem. Ikea zigbee e12 lamp randomly on-off state in HA. old light.py file solved problem 123

Sergmasharov avatar May 12 '24 09:05 Sergmasharov

Any brightness or color_temp update will mark light as on state. This is main changes between this 4 and 5 versions https://github.com/AlexxIT/XiaomiGateway3/compare/v4.0.4...v4.0.5

AlexxIT avatar May 12 '24 13:05 AlexxIT

Yes, but lamp all the time is off. HA changes state randomly.

Sergmasharov avatar May 12 '24 13:05 Sergmasharov

The same issue, too. I use the Xiaomi light mesh group. It will still report the status of color_temp when it is off. Realted log is as follows.

May  8 18:43:41 Mijia_Hub_V2-3022 user.notice miio_bt[476]: [N][mesh_gateway] mible_mesh_report_states 1883: id = 1372128240, js = {"type":16,"method":"properties_changed","params":[{"did":"1030382664","siid":2,"piid":3,"value":4504},{"did":"103035776","siid":2,"piid":3,"value":4504}]}

Maybe it would be better to additionally mark the light as on state only when brightness updates itself to be greater than zero?

BeckXuan avatar May 12 '24 14:05 BeckXuan

Hi @AlexxIT

All my lights mentioned at #1321 are having the same issue. Please help to fix.

Thanks

hubpf avatar May 16 '24 05:05 hubpf

I have the same problem, the state of the latest version of the light is wrong.

zhang-wenchao avatar May 30 '24 07:05 zhang-wenchao

https://github.com/AlexxIT/XiaomiGateway3/releases/tag/v4.0.6

AlexxIT avatar Sep 04 '24 21:09 AlexxIT