-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Battery sensor always 0% #3
Comments
It's strange, I also tested it at firmware 3.3.1, it's should work properly. Can you check the battery level with Flower Care application, if it's also shows 0% try to replace the battery. Decimal 1 for battery of Mi Flora it's a pointless because battery stores in one byte and doesn't have decimal point. From battery point of view "flower_care_battery_ble_advertise.yaml" and "flower_care.yaml" is equal because it's use same method, but you can do it less frequently by specifying update_interval, in examples its 24h which I think is reasonable. If you use Passive BLE Monitor for sensors, better to use "flower_care_battery_ble_advertise.yaml" and have all data in one place (BLE Monitor) instead ESP. |
Seems that under 2%-3% in the app, I get 0% from this component.
Thx, updated.
I left the 24h as per your sample.
I don't have bluetooth on HA, it's running as a docker container in my NAS. Simone |
I did some tests with Flower Care app, in my case (IOS). I manage to connect to MiFlore with old batteries (less than 20%) after 10-15 retries, and I get --%, 0% and some > 10% < 20% but never seen 2-3% maybe application did some adjustment’s if battery too low. In this tests component show values > 0. BTW the firmware 3.3.5 is available from app, I did update and it's looks fine (I suggest to use new battery for firmware update, after update you can install old one). You can use Passive BLE Monitor at the host without any BT adapters, and configure it in yaml without specifying bt_interface. BLE Gateway from ESP will feed Passive BLE Monitor with data. |
Finally I get 0% from component, when I connect to device with Flower Care app it's also shows 0%. Will see how this will changes. |
Played with different batteries and finally got values > 0.
I'm not offered this version when I go in the app menu: still says 3.3.1 is the latest :-S
I will consider switching then, seems make all things easier to handle Simone |
@myhomeiot hi, what is the proper and preffered method of contacting you ? |
I created a thread here where you can post your question or send PM. |
@chemelli74 It's still shows 0% battery to FlowerCare application and keep working. It's looks like problem of battery percentage calculation on device, and we can't do anything. If 0% is annoying, you can add if to the lambda and check if it's report value less than 10% count it as 10%. |
@chemelli74 After few weeks, device which shown 0% start report battery level 13%. I think for this devices we can use battery level just for information and replace battery only after device became unavailable. |
@myhomeiot, I also think that each restart of HA fires a new request for fw and battery %, thus consuming a lot of battery. Is there a way for esphome to cache those data and avoid requesting them each time ? Simone |
@chemelli74, You are sure? The new fw and battery request can be fired only if ESP is restarted or
Also check that you have
|
I have two MiFlora devices which for last 6 months shows 0% but keep working and sending other data as BLE advertisement. I think battery level information from MiFlora is useless and better to check if it's alive using last change timestamp of illuminance reported by device. |
I implemented your code for firmware and battery.
Only changed 2 things:
This is the result:
How can I debug the issue of battery sensor ?
P.S.> From battery point of view, is better to go with "flower_care_battery_ble_advertise.yaml" than "flower_care.yaml" like I did ?
Thx in advance,
Simone
The text was updated successfully, but these errors were encountered: