SwitchBotAPI
SwitchBotAPI copied to clipboard
hubDeviceId contains deviceId in the status of Plug Mini (JP)
Analysis
When retrieving the status of the Plug Mini (JP) using the status retrieval API, the hubDeviceId and deviceId have the same value. It appears that the deviceId is being set to hubDeviceId.
Expected Behavior
{
statusCode: 100,
body: {
deviceId: 'DCDA0CDXXXXX',
deviceType: 'Plug Mini (JP)',
hubDeviceId: 'F3131FAXXXXX',
power: 'off',
voltage: 102.2,
weight: 0.4,
electricityOfDay: 200,
electricCurrent: 0.04,
version: 'V1.8-1.8'
},
message: 'success'
}
Steps To Reproduce
"Retrieve the status of the Plug Mini (JP) using the status retrieval API (GET /v1.1/devices/{deviceId}/status)."
Logs
The response when retrieving the status of the Plug Mini (JP) using the status API.
{
statusCode: 100,
body: {
deviceId: 'DCDA0CDXXXXX',
deviceType: 'Plug Mini (JP)',
hubDeviceId: 'DCDA0CDXXXXX',
power: 'off',
voltage: 102.2,
weight: 0.4,
electricityOfDay: 200,
electricCurrent: 0.04,
version: 'V1.8-1.8'
},
message: 'success'
}
### Configuration
```json
There are no relevant configurations.
Environment
- OS: Rocky Linux release 9.4 (Blue Onyx)
- Software: Next.js v14.2.3
- Node:v20.14.0
- npm:10.8.1
Additional Context
No response