Skip to content

Cannot Retrieve RGB Color from RGBIC Floor Lamp via API #452

@nzws

Description

@nzws

Analysis

The response data for the RGBIC Floor Lamp does not match the API specification, and the RGB color value cannot be retrieved.

According to the documentation, the color property should be available, but it is not included in either the Get device status response or the Webhook payload.
https://github.com/OpenWonderLabs/SwitchBotAPI?tab=readme-ov-file#rgbicww-floor-lamp-1
https://github.com/OpenWonderLabs/SwitchBotAPI?tab=readme-ov-file#rgbicww-floor-lamp-3

Additionally, when the RGB color is changed, no Webhook event is triggered. Webhook payloads are only sent when the color temperature is changed.

Expected Behavior

  • The RGB color property should be included in all relevant payloads.
  • A Webhook event should be triggered when the RGB color is changed.

Steps To Reproduce

  1. Purchase an RGBIC Floor Lamp and link it to a SwitchBot account.
  2. Change the lamp’s color to an RGB color using the SwitchBot app.
  3. Execute the Get device status API to check the lamp’s state.
  4. Confirm that the color property is missing from the response.

Logs

Below is the actual payload returned from the Get device status API:

GET https://api.switch-bot.com/v1.1/devices/XXXXXXXXXX/status
{
  statusCode: 100,
  body: {
    version: 'V0.7-0.7',
    power: 'on',
    brightness: 100,
    colorTemperature: 6500,
    onlineStatus: 'online',
    deviceId: 'XXXXXXXXXX',
    deviceType: 'RGBICWW Floor Lamp',
    hubDeviceId: 'XXXXXXXXXX'
  },
  message: 'success'
}

Configuration

N/A

Environment

N/A

Additional Context

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions