Question: toggle button in OFF state #71
-
|
Is there a way to assign an OFF state to a toggle button (type="toggle") at startup? Anytime i plug USB cable or at a pico reboot the button is in ON state and i have to toggle it manually. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
|
I'll have a take a look at it - I'd actually expect the initial state to always be OFF, so there might be something there to fix. But one way or the other, it would probably be a good idea to add an option to set the initial state to either ON or OFF as desired. I'll let you know what I find when I have a chance to look at it. |
Beta Was this translation helpful? Give feedback.
-
|
So it looks like it should be starting in OFF state as I'd expect. However, that assumes that the underlying physical button is ALSO reading as OFF initially, Is there any chance that the underlying button is reading as ON by default? For example, this would be the case if you're using a GPIO that you've wired so that pressing it connects it to GND, but it's set to If that doesn't shine any light on, it would probably help if you could attach your JSON configuration so I can take a look at your button setup. |
Beta Was this translation helpful? Give feedback.
-
|
Can you also show me the active: "low" version, just to make sure it's in the right place? |
Beta Was this translation helpful? Give feedback.
-
|
Confirmed the toggled-on-at-startup behavior. It's a bug in the software initialization that occurs when the underlying physical GPIO source is in active-low mode. I've fixed this for the next update. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.


Confirmed the toggled-on-at-startup behavior. It's a bug in the software initialization that occurs when the underlying physical GPIO source is in active-low mode. I've fixed this for the next update.