Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light status on HA changes automatically without really affecting the lamp #1351

Open
macming opened this issue May 8, 2024 · 5 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@macming
Copy link

macming commented May 8, 2024

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
@Sergmasharov
Copy link

Sergmasharov commented May 12, 2024

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

@AlexxIT AlexxIT added the bug Something isn't working label May 12, 2024
@AlexxIT AlexxIT self-assigned this May 12, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented May 12, 2024

Any brightness or color_temp update will mark light as on state. This is main changes between this 4 and 5 versions
v4.0.4...v4.0.5

@Sergmasharov
Copy link

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

@BeckXuan
Copy link
Contributor

BeckXuan commented May 12, 2024

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?

@hubpf
Copy link

hubpf commented May 16, 2024

I have adaptive lighting to change light brightness and temp by following the sun. I can see all lights are showing on status, but not really physically on. Please help to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants