Closed wettermann32 closed 2 years ago
Sorry, I don't have an idea how to do this. I guess this functionality will be added sometime as a native component, and it will probably already be possible now with the right lambda. Maybe try asking on the ESPHome forum?
Coincidentally, I just found this: https://github.com/esphome/esphome/pull/2200#issuecomment-962559276
This looks like you could use it for your purpose too.
Thanks for your help, in between somebody wrote an integration for my sensor direct. https://esphome.io/components/sensor/radon_eye_ble.html
Hi, i am using your example for a Radon sensor (Radoneye). So far i can read the last value from the sensor with this. But my sensor needs to write a value to a characteristic in order to send a produce an updated value. Any idea how i could manage this with BLETracker?
The code would be:
BLERemoteCharacteristic* p2RemoteCharacteristic; ... p2RemoteCharacteristic = pRemoteService->getCharacteristic(char24UUID); if(p2RemoteCharacteristic->canWrite()) { p2RemoteCharacteristic->writeValue(0x50);
After this a new sensor value is send on a second characteristic.
Thaks for your help,
Michi