Using new BTHome library #4267
Replies: 1 comment
-
Posted at 2024-02-02 by user156756 PS In an automation the device action can be single/double/long etc - but other than a single press nothing is recognized. Thanks. Posted at 2024-02-05 by @gfwilliams What happens if you just have a single I just tried this and it seems to work ok for me - short presses are
I'm struggling to get Home assistant logs at the moment but this is definitely advertising the correct data. You could extend the Posted at 2024-02-06 by user156756 this works with press and long_press. I can see the events hapenning under BTHome, device (Puck). I had to add var buttonState; at the top. will try double_press next. Thanks. Posted at 2024-02-06 by user156756 Rather than try to do the time calculations I am trying to use the SWButton.js module.
Seems quite fast Thanks Posted at 2024-02-07 by @gfwilliams Yes - that looks good to me! Glad you got it working! Just so you know I added a Bangle.js app that allows you to add custom icons : https://banglejs.com/apps/?id=bthome |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-02-02 by user156756
Coming back to this for a bit. Great to see a BTHome library. Quick and easy device/sensors into HA.
Works great with your example using a singlebutton press. I can see the event on the Home Assistant log.
One thing I can't figure out is how to set up long press and double press events. This sends through both a double and a single press when I hit the puck button once
Feeling stupid - Thanks
Beta Was this translation helpful? Give feedback.
All reactions