custom-components / ble_monitor

BLE monitor for passive BLE sensors
https://community.home-assistant.io/t/passive-ble-monitor-integration/
MIT License
1.89k stars 243 forks source link

[Bug]: Add option for devices becoming unavailable after x minutes have passed? #1220

Closed jenshenk closed 9 months ago

jenshenk commented 1 year ago

What happened?

I'm collecting data from BLE devices via esp32s scattered around my house and this integration. For the data that is being sent by the esps via mqtt I use the option in the configuration.yaml that sensors become unavailable after some time. Would it be possible to have this option for this integration, too? I just noticed that when I e.g. leave the house with my Mi Band 6 the mqtt sensors show it as unavailable after the configured time, while the passive ble integration just keeps showing the last value as if it would still be there. For presence detection I can use that the rsi did not change for x minutes, but having the option to show it as unavailable would be even better.

Sensor type

Mi Band RSI

Relevant log output

No response

Ernst79 commented 1 year ago

There is an option to use a sensor as device tracker. You can find it in the ble monitor options, select your sensor in the devices pull down menu and enable the option to track the device (https://custom-components.github.io/ble_monitor/configuration_params#track_device). You can use the consider_home option to set the time after which it should assume it to e away.