Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
1.44k stars 39 forks source link

Pop-up trigger issue #609

Open pgale opened 4 days ago

pgale commented 4 days ago

v2.0.4

I originally started this as a discussion but believe it should be an issue.

Using the pop-up trigger does trigger the pop-up. However, if you somehow navigate away from the popup by closing it or pressing another pop-up button, the sync of the pop-up is then broken. This can then cause a whole load of problems if trying to re-trigger the pop-up via an animation as the pop-up boolean specified is already set as ON. Setting it to ON again obviously doesn't work to show the pop-up again and any animation calling the pop=up doesn't work.

I'm developing an alarm clock animation that relies on showing a pop-up when the alarm is ringing. I can cludge the close button by removing it but I still have the horizontal button stack which allows this behaviour to happen and the pop-up to break. Having thought about this and tried adding work-arounds, I think the most logical option to resolve this is to better link the pop-up to the trigger entity and when a pop-up set with a trigger is closed or navigated away from by using another trigger, the entity should be set to OFF. This would get towards a stateful popup system and better resolve these issues.

I guess this would be best as an option for boolean toggle entities in case someone is using an entity that shouldn't be modified by the pop-up.

Clooos commented 2 days ago

Hi, indeed I guess that the best option would be to add the ability to trigger an action when the pop-up is closed/opened.

Something like open_action: and close_action:.

pgale commented 2 days ago

Hi Clooos, yes that would be super flexible and allow for all kinds of other possibilities :)

Are you able to properly track the close option though if someone navigates away from the dashboard rather than just closing it using the various methods we have now (close button, swipe down or the other navigate options within the dashboard)? Would that cause any issues?

Clooos commented 2 days ago

Indeed I will need to try that use case.

Oh and by the way, this is totally unrelated but I followed a GitHub guide for my ThinkSmart View and I realized it was from you! Small world 😁 Thanks a lot for that, it was really clear and well done!

IMG_20240629_155059

pgale commented 2 days ago

Great, I look forward to that option. It'll complete the design of my alarm clock on two of my ThinkSmart Views :)

Glad you got on with the flashing guide, they are great devices. A few small niggles here and there but all have been manageable. I've got seven now and that's where I stop! 🤣 I know someone else bought 12 of them for all locations around his house. Great for showing pop-ups for cameras and key events. Really brings HA to life.

Bubble card is at the heart of my dashboards and works great for organising all the extra controls and detail I need. The TSV just needs a bit more memory I think. The pop-ups work better on Lineage 15.1 but are still a little slow. But that's a downside of this device. Still can't grumble at the absolutely amazing value though! 😁

Clooos commented 2 days ago

Indeed I had some issues with the pop-ups in some cases and I'm not sure that I will be able to optimize these even more (even if I will probably try again 🤓).

For now I've replaced the dashboard from the photo to a new view just for that room and it's probably even better to use it like this, I have no pop-ups on that view.

image
Clooos commented 2 days ago

I've just found a massive memory leak in the sub-buttons, this was slowing down the pop-ups a lot on slow devices! It's now working perfectly on the ThinkSmart View!

pgale commented 2 days ago

Oooh, fabulous. Are you releasing a beta?

Clooos commented 2 days ago

I'm fixing some other issues then I will 🙂