SwitchBotAPI icon indicating copy to clipboard operation
SwitchBotAPI copied to clipboard

Get Status api endpoint is always returning 100 success even if I remove battery from my Thermometer and Hygrometer sensor

Open abmptit opened this issue 7 months ago • 1 comments

Analysis

I have a Thermometer and Hygrometer sensor, I'm getting information from this endpoint GET https://api.switch-bot.com/v1.1/devices/.../status I removed battery from my sensor to test the endpoint response. Expected Getting offline status (as for Switchbot app) Actual same response { "statusCode": 100, "body": { "version": "V0.0", "temperature": 8.1, "battery": 60, "humidity": 33, "deviceId": "....", "deviceType": "WoIOSensor", "hubDeviceId": "....." }, "message": "success" } How can I get offline sensor information from api plz ?

Expected Behavior

Expected Getting offline status (as for Switchbot app) Actual same response { "statusCode": 100, "body": { "version": "V0.0", "temperature": 8.1, "battery": 60, "humidity": 33, "deviceId": "....", "deviceType": "WoIOSensor", "hubDeviceId": "....." }, "message": "success" } How can I get offline sensor information from api plz ?

Steps To Reproduce

I have a Thermometer and Hygrometer sensor, I'm getting information from this endpoint

  1. call GET https://api.switch-bot.com/v1.1/devices/.../status
  2. remove battery from sensor
  3. call again GET https://api.switch-bot.com/v1.1/devices/.../status

Logs

{
    "statusCode": 100,
    "body": {
        "version": "V0.0",
        "temperature": 8.1,
        "battery": 60,
        "humidity": 33,
        "deviceId": "....",
        "deviceType": "WoIOSensor",
        "hubDeviceId": "....."
    },
    "message": "success"
}

Configuration

mini hub + temp sensor connected on the cloud

Environment

  • OS:
  • Software:
  • Node:
  • npm:

Additional Context

No response

abmptit avatar Jun 11 '25 14:06 abmptit

Dear developers, because we have different definitions of power for different products, please check our latest API documentation for the corresponding relationship between the app display and the API.

Likewindovo0830 avatar Jun 24 '25 04:06 Likewindovo0830