Bluetooth-Devices / bthome-ble

Parser for BTHome BLE devices
https://bthome.io/
MIT License
67 stars 12 forks source link

shelly BLU button #66

Closed lecrams closed 1 year ago

lecrams commented 1 year ago

When I for the first time powerup my new shelly BLU button it get recognized by the BThome integration. If I then check the properties of the device I only see entities for battery, and two disabled enties for Packet ID and signal strength. I would have expected a entity for at least a single press altought the shelly documentation suggests that also the double and triple press are identified.

What I noted: On the button the number of presses if shown by a number of blinks of the LED. The value of PacketID is incremented by one for every press.

Is an update of the integration needed or is there something else wrong?

Ernst79 commented 1 year ago

The Shelly BLU button is sending BTHome button events. Events are just recently added to the BTHome Home Assistant integration, and will be included in the 2023.5 release. You can already test it with the current HA beta/dev version, otherwise, you will have to wait a few days.

Ernst79 commented 1 year ago

HA 2023.5 has been released today, so this issue should be resolved now.

lecrams commented 1 year ago

I am now on core 2023.5.1 but I still have only 3 entities for the button image

Didn't the change make it to the release?

Ernst79 commented 1 year ago

It wont create entities for the button, it sends events. Try to make an automation.

lecrams commented 1 year ago

What is then the type of the button event to be received? Do you have some sample code for an automation

Ernst79 commented 1 year ago

It is a bthome_ble_event but if you add an automation, and select the device, the event options should automatically be visible.

image

lecrams commented 1 year ago

Issue solved. The event type was the last missing info. THX. maybe something to add in the documentation ?