-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 14 replies
-
Are you using the Activate Page blueprint with that? If os, I've just pushed a minor change to the behavior on that blueprint, can you try re-importing and see if it makes any difference? |
Beta Was this translation helpful? Give feedback.
-
I've just posted another update to "Activate Page" after doing some more testing. Previously, the "activate page" was being triggered on button press (not release), so when you pressed the button down the page immediately changed. The way that the overlay icons work is that they are triggered on release, so when you let up on the button, it paints the icon back into place (because pressing the button removes it). So, press button, page changes, that makes you release the button, icon is painted on the new screen. In general, changing pages on Nextion on button press is problematic, and can lead to buttons being "stuck" as they might never catch a release event, as you never actually let off the button because the page changed before you removed your finger. So, step one was to fix that blueprint such that it triggers on release instead of press, which I should have done in the first place due to the issue above. However... still doesn't fix the problem 100% of the time. It becomes a race as to which of the two blueprints are going to trigger and then execute first, with both responding to the same button-release event. After some testing, what I've "fixed" is to simply add a 100msec delay to the page change blueprint. You release the button, home assistant catches that, repaints the icon right away, and then 0.1 seconds later sends the command to change the page. In my testing this seems to work reliably while not interfering w/ icon overlays. |
Beta Was this translation helpful? Give feedback.
-
Having the same issue here. This belongs in the Issues section though. |
Beta Was this translation helpful? Give feedback.
I've just posted another update to "Activate Page" after doing some more testing. Previously, the "activate page" was being triggered on button press (not release), so when you pressed the button down the page immediately changed. The way that the overlay icons work is that they are triggered on release, so when you let up on the button, it paints the icon back into place (because pressing the button removes it). So, press button, page changes, that makes you release the button, icon is painted on the new screen.
In general, changing pages on Nextion on button press is problematic, and can lead to buttons being "stuck" as they might never catch a release event, as you never actually let o…