batteries status always 100%
Analysis
While other parameter values are correct (direction, slideposition) the battery value of this blind tilt device is always 100%: I used samples found here, this is the json answer: {'statusCode': 100, 'body': {'deviceId': 'xxxxxxxxxxx', 'deviceType': 'Blind Tilt', 'hubDeviceId': 'xxxxxxxxxxx', 'version': 20, 'calibrate': True, 'battery': 100, 'direction': 'Down', 'slidePosition': 50}, 'message': 'success'}
Expected Behavior
battery value updated
Steps To Reproduce
using a sample py script calling the endpoint: 'https://api.switch-bot.com/v1.1/devices/' + DEVICE_ID + '/status'
Logs
answ = 200
{'statusCode': 100, 'body': {'deviceId': 'xxxxxxxxxxx', 'deviceType': 'Blind Tilt', 'hubDeviceId': 'xxxxxxxxxxx', 'version': 20, 'calibrate': True, 'battery': 100, 'direction': 'Down', 'slidePosition': 50}, 'message': 'success'}
Configuration
- OS: windows 11
- Software: running py script with vs code
Environment
- OS: windows 11
- Software: running py script with vs code
Additional Context
No response
Please fix this. This has been a bug for so long now. I still cant use battery icons on my homeassistant because they're not working.
I know its not the HomeAssistant plugin. The problem is with the SwitchBot API just not returning the correct values. I talk directly to the API with Python without any form of HA plugin and I get the wrong numbers. Seems like its a forgiven case as this issues has been around forever. Too bad
for outdoor meter pro im seeing battery as 50 in the api. but in the app is always shown as 100%. I just started buying switchbot meters so will update when batteries start to drop.
https://api.switch-bot.com/v1.1/devices/C76A01862466/status
{"statusCode":100,"body":{"deviceId":"C76A01862466","deviceType":"WoIOSensor","humidity":66,"temperature":23.4,"version":"V0.5","battery":50},"message":"success"}
"battery":50 - in official switchbot app its 100%
still same issue ...
Hi All , Any update on this topic please ?
Disappointing to say the least that Switchbot (I really like their devices) are not getting into gear and fixing this erroneous reporting of battery level via the API. Means that I'm not going to be getting any more devices as they won't work in Home Assistant with the API error. Surely they can fix this in a few hours and not leave it for weeks or months....
Switchbot have certainly going to go down in my estimation as a company if, as it appears, they are not even reading straightforward bug reports.
unbelivable, just a single API return value in a single json...why they doesnt fix it ? read the issues, talk to customers, take your time and fixit ! so standard....
Yes, this is so annoying. I have my whole smart home setup within HA and it just bugs me out that I cannot simply read out the battery % of my switchbots. Such a simple thing to fix.. I cannot understand why they simply would not fix this problem.
@Titou84240 @aubreyz @LivingMachine00 @kaboemm
What firmware version are your blind tilts on? I know for a fact this was an issue on firmware v2.2, however, last night I updated my blind tilts to firmware v2.3 and now the battery life % is being reported correctly to Home Assistant.
I'd try upgrading to v2.3 if your blind tilts aren't already on that version.
HOWEVER, and this may be unrelated, but I am STILL having issues with the Light Level being reported incorrectly. As mentioned here: https://github.com/home-assistant/core/issues/94742
@Titou84240 @aubreyz @LivingMachine00 @kaboemm
What firmware version are your blind tilts on? I know for a fact this was an issue on firmware v2.2, however, last night I updated my blind tilts to firmware v2.3 and now the battery life % is being reported correctly to Home Assistant.
I'd try upgrading to v2.3 if your blind tilts aren't already on that version.
HOWEVER, and this may be unrelated, but I am STILL having issues with the Light Level being reported incorrectly. As mentioned here: home-assistant/core#94742
I'm not using the blind tilts, i'm using the switchbot curtains and running the latest firmware 6.5. I've just checked and there is no new firmware.
@Titou84240 @aubreyz @LivingMachine00 @kaboemm
What firmware version are your blind tilts on? I know for a fact this was an issue on firmware v2.2, however, last night I updated my blind tilts to firmware v2.3 and now the battery life % is being reported correctly to Home Assistant.
I'd try upgrading to v2.3 if your blind tilts aren't already on that version.
HOWEVER, and this may be unrelated, but I am STILL having issues with the Light Level being reported incorrectly. As mentioned here: home-assistant/core#94742
Hi ! Same here i'm not using blind tilts , i'm using Switchbot meter plus and using the lastest firmware.
It is a goodthought @pilonull Just to check - are you using the Cloud integration or the direct Bluetooth Switchbot integration in HA (the latter does transfer correct battery values).
I am using many of the thermometer/hygrometer devices and on the Cloud API these always report 100% battery. I have just updated the firmware from 0.4 to 0.5 but I doubt this will help (I won't know for a while as the battery level only reports in every day or so)
Just an update. I update all except on to latest firemware. Devices on latest firmware now all have same battery level at 60% in APi instead of 100. All still reporting wrong battery status. Using Switchbot check OUTDOOR METER > under Firmware and Battery one was 92% battery. firmware 0.8 api for same device reporting battery at 60 https://api.switch-bot.com/v1.1/devices/ { "deviceId":"C76A0.....238", "deviceName":"5. Bedroom - OM 2", "deviceType":"WoIOSensor", "enableCloudService":true, "hubDeviceId":"FF0.....F9F0" }, https://api.switch-bot.com/v1.1/devices/C76A....2238/status { "statusCode":100, "body":{ "version":"V0.5", "temperature":18.5, "battery":60, "humidity":59, "deviceId":"C76A....2238", "deviceType":"WoIOSensor", "hubDeviceId":"FF0....9F0" }, "message":"success" }
"battery":60,
Images from Switchbot app - uses latest firmeware - battery percentage 92% doesnt match api "60"
life
blind v.23 firmw
I have compiled a list of the app display and API responses for various battery-powered SwitchBot devices I own.
| FirmVer | App(Bluetooth) | API | |
|---|---|---|---|
| Curtain | V6.5 | 31% | 40% |
| Universal Remote | V4.2 | 90% | 90% |
| Motion Sensor | V1.3 | 16% | 20% |
| Smart Lock | V6.8 | 100% | 100% |
| Contact Sensor | V1.0 | 93% | 100% |
| Meter Plus | V0.8 | 61% | 100% |
| Meter Pro CO2 | V1.5 | 100% | 100% |
| Remote | V4.6 | 55% | - |
| Wallet Finder Card | V1.5 | 100% | - |
| Outdoor Spotlight Cam 2K | V3.1.33-1.1 | 100% | - |
| Keypad Touch | V2.0 | 100% | - |
- The Lock has had its batteries replaced recently. (The API showed 50% a little while ago.)
- The Meter Pro (CO2) has been continuously connected to a USB power source.
Surprisingly, even when I disable Bluetooth on my smartphone and display the battery status of each device via a mobile network and Hub, the values match those shown when using Bluetooth. I am highly dissatisfied that only the API consistently displays incorrect values.
Hi Here is some info from Switchbot on this ....
Hi Here is some info from Switchbot on this ....
they can't be serious, >60% = 100%.......cmn ! they can do better
And it does not even do that. Pity but I won't be getting any more Switchbot devices given that attitude. Why have an API at all if a) it reports garbage and b) they have this sort of no-care attitude to bugs. Really really disappointed because their thermometers are good.
It's actually crazy that they cannot or are not willing to fix this. I can't imagine that this would take a lot of effort.
Hi guys, it's Davidson from SwitchBot. Really really sorry about the frustration on the inaccurate battery level. We had some shitty legacy designs on the firmware such that we use two bits to represent the battery level in intervals, 00 (less than 10%), 01 (10%~20%), 10 (20%~60%), and 11 (≥60%). I couldn't agree with you more that we failed to implement the fundamental stuff properly. It's gonna take some time to fix all the battery-based products. For now we will fix the docs to make things clearer. Apology again and thanks so much for addressing these issues!
Hi Davidson, any idea on timing for a fix yet? Thanks
Even if there is a restriction to 2 bit the 60% threshold is bad one. Most IOT devices start causing issues long before the battery gets to 60%, and depending what battery is being used (like a Lithium one) it might go from 80% to failure within a day or two. <30, >50, >70, >90 may be better thresholds if you can't change the firmware but can change the API
20 and 60 are very far apart....