Well, from the error I can conclude that “name_toothbrush_seconds” is defined as a text_sensor, so the “publish_state” expects a string as parameter and not an integer. Without the rest of your yaml is not easy to say what the best way is to solve your problem.
Rest of the YAML is what’s above on the page in the post prior to mine, is why I didn’t include it, but thanks for the pointer.
I have created a custom integration that uses active mode to get the battery percentage and some other information:
There’s work going on with the built in one to add it too - feat: added init support for active connection to get battery and bet… by conway220 · Pull Request #32 · Bluetooth-Devices/oralb-ble (github.com)
1 Like