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

Bug/Feature Request: Lights do not react to Scene changes fast enough. #118

Closed
forgenator opened this issue Nov 22, 2023 · 7 comments
Closed

Comments

@forgenator
Copy link

Hi, I've just installed Home Assistant, and have moved from Philips Hue to HA completely. Using this hue-light cards was a god send so that we can easily build a dashboard that mimics the functionality of Hue -app, while enjoying everything else.

The sad problem i've noticed, is that the cards are somewhat slow to update, or do not update at all.

  • If i update the lights using a predefined Scene, the actual cards in the dashboard stay the same color as before, until i press somewhere in the dashboard, after which all cards update.
  • If i modify the lights using the slider in the dashboard, the other cards react, better, but not always instantly.
  • If i go into the scene selection, and modify the lights using the the lights under the scene selection, then they all react instantly.

This makes the whole experience rather difficult, because the cards do not reflect the actual state of the lights. You have a "Coming soon feature" in your readme.md: "faster reactions between multiple cards (instant change of value on other cards)". So i was wondering, what is the status, or is this an issue you are aware? 🤔

And just to inform, if i add something else, like "Custom: Slider Card" the reaction is instant on all light entities. So i'm certain it is just this addon that has some issue with receiving information/updating information from the Zigbee network. The problem of course, stems that i like the UI and Scene usage of this addon.

Information:

  • Raspberry pi 5 8GB
  • Home Assistant - Container - Host Mode
  • Using ZHA integration, all lights have been added to ZHA, one group "all lights" created as ZHA group.

Versions:
Core 2023.11.2
Frontend 20231030.2

@Gh61
Copy link
Owner

Gh61 commented Nov 22, 2023

Hi, you're right.
As you said, this is a bug that I'm aware of.

There are multiple issues at once.

  • updating light attributes after scene activation seems to be the hardest one. In my experience some (simpler) scenes are updating light values almost instantly, other scenes are taking some time to update values (not only in my card).
    • I'd still like to take a look on this
  • reaction of other hue-cards on slider change - this is exactly the feature I'd like to implement

All in all, I'll have to revisit and maybe rewrite caching of set values and take a look on possibilities to load light attributes faster after scene activation.

Sadly I keep pushing this bug/feature more and more to the future, as requests for another features are coming.

But thank you for your interest, this raised the importance of this issue.

@forgenator
Copy link
Author

Just a quick-hotfix do you think it would be possible to add something like "cache: false" flag for cards, so that you do not actually cache anything and all values would come straight from the zigbee network instantly when the zigbee network get's updates? As far as i'm aware, there are no caching mechanism in slider-button-card (https://github.com/mattieha/slider-button-card/) and with my small testing, it does work almost instantly on updates to zigbee network.

This would make it so that bypassing cache is an actual action by the user and not something you would encourage, but which would make the cards more responsive, while in the mean time you think of a way to rewrite any parts of the code.

@forgenator
Copy link
Author

And just to give more input since I've tried to understand everything since everything is so new:

  • updating light attributes after scene activation seems to be the hardest one. In my experience some (simpler) scenes are updating light values almost instantly, other scenes are taking some time to update values (not only in my card).

In HA you have two ways to activate light changes across multiple lights, you can create HA -groups or ZHA -groups. With HA -groups, HA actually sends an update for each light separately, which is why if you modify a HA-light group, you might see lights activated in different times.

But if you create a ZHA -group, what HA actually does, is only sends one single update to the Zigbee network, and all lights should react to this instantly. As i wasn't sure where the problem was, i tried both ways, update multiple entities or update a single zigbee group, both resulted in the same unresponsiveness in the frontend.

Just thinking aloud, since i'm not sure where the actual problem is with updating light entities. 🤔

@DerPicknicker
Copy link

@forgenator ...

Firstly I created normal groups inside HA. But today I switched to ZHA-Groups and the response-Time is awesome nearly real-time. Only the Animation is for my favour to slow. I will create for this an additional Issue.

Anybody how is not using ZHA-Groups you should migrate its really mindblowing. Before that I had some sync issues with the color I set and the light are updated. But now all these issues are gone....

@Gh61 Gh61 added this to the v 1.7.0 - First 2024 release milestone Dec 3, 2023
@Emyrk
Copy link

Emyrk commented Dec 4, 2023

I have also encountered this, and unfortunately the "lag" in the UI update makes this hard to use for my partner. It is not intuitive, and often feels like the lights are not working appropriately.

If you watch the device in HA on the device tab, they do react instantly. So the information is present.

@ruckerzerg
Copy link

unfortunately the "lag" in the UI update makes this hard to use for my partner

I'm currently switching everything from hue to HA and I have to admit this bug has a very bad wife acceptance factor... 😄
I'd appreciate if you prioritize it over new features!

@Gh61
Copy link
Owner

Gh61 commented Jan 21, 2024

  • Fixed the issue with time-cache (card updating later than other cards).
  • Added the instant change feature (all hue-cards will react to changes in other hue-cards instantly when the change happens).
  • Color detection from activated scene - this is still dependent on how fast the HA register color change on affected lights

Will be in the next Release

@Gh61 Gh61 closed this as completed Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants