Bluetooth-Devices / bthome-ble

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

Number entities #61

Closed Chreece closed 1 year ago

Chreece commented 1 year ago

Is your feature request related to a problem? Please describe. There is no number object id available.

Describe the solution you'd like There is a count sensor but can't be changed in HA. A number sensor has the ability to send a value that is avaliable to be "corrected" by the user

Additional context I want to build a people counter. Since the sensor can have false positives / negatives, I want to have the ability to change the number in HA via automations

Ernst79 commented 1 year ago

The problem, I think, is that your sensor will still continue to send the old value. So the next time HA receives an update of your sensor, it will continue based on the "wrong" values.

I think there are two solutions for this.

  1. Can't you make some kind of automation in HA. E.g., create a number entity in HA, and let it increase with one if a BTHome sensor detects motion. Create another automation/script that will allow you to change the number entity. Examples how to modify a sensor value https://community.home-assistant.io/t/how-to-manually-set-state-value-of-sensor/43975

2, Modify your firmware on your BTHome device, such that it can receive data and it changes the value it sends. This is something you have to program yourself, BTHome is just the format of the data.

Chreece commented 1 year ago

You are absolutely right! I'm closing this. Thank you!