question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Occasional wrong states on pico button press

See original GitHub issue

Not sure how to best troubleshoot this.

Seemingly randomly some of my pico remotes will stop working correctly. These remotes aren’t paired to an actual caseta dimmer, just to the hub, and I use an automation to make them control non-caseta lights.

I put some logging on it and found out that when this happens, the numeric state on the sensor entity is wrong. Everything is +8 - so when no buttons are pressed, the state is 8 instead of 0, on is 9 instead of 1, favorite is 10 instead of 2, up is 16 instead of 8, etc.

Usually a restart of Home Assistant will fix the issue, or sometimes it will fix itself after a couple hours.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
upsertcommented, Jun 24, 2019

I have attempted to simplify the state updates again for the sensor. Releasing the button will always set the state back to zero and the states are no longer combined on update.

This may not fix the problem if the component never receives the message for the button release, but it will at least simplify the logic.

1reaction
cgarwoodcommented, May 22, 2019

Just had it happen again this evening, but this time everything is +4 instead of +8, which is different from all the other times this has happened in the past that I’m aware of. Only 1 pico though, the others all seem to be working fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

False input coming from use of Pin.IN (seeing noise?)
So I'm occasionally seeing "button.value() == 1" when the button isn't being pressed - i.e. if I run in a loop, I'll see...
Read more >
Pico - long press, possible? · Issue #25 · upsert/lutron-caseta ...
Is there any way to have long press considered as a different function than ... Button) if pico_state_value == 2: is_long_press = False...
Read more >
RPi Pico not reading a button correctly
It works and responds to my button presses. HOWEVER, sometimes Pico says that the button is pressed while it is not. After a...
Read more >
Getting Started with Raspberry Pi Pico and CircuitPython
Remember, when the button is pressed, it returns True , and when it's not, it returns False . When the LED is set...
Read more >
Raspberry Pi Pico using MicroPython - Tutorial #2 - YouTube
The Raspberry Pi Pico is a new flexible microcontroller board from ... micropython on the Pico by taking input from a micro push...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found