SwitchBotAPI icon indicating copy to clipboard operation
SwitchBotAPI copied to clipboard

Brightness field is used in different ways

Open alamers opened this issue 4 years ago • 10 comments

Describe The Bug: The documentation for the GET /v1.0/devices/{deviceId}/status mentions the field brightness twice, with different definitions. It looks like the motion sensor and contact sensor report a different type than the color bulb.

To Reproduce:

See documentation

Expected behavior:

Probably one of the brightness fields should be called differently. The way it is described now makes it very hard to integrate with this API from strongly typed languages such as Java (I am working on an OpenHAB implementation), as there are two types defined for the same field name.

Device Model: Motion sensor/Contact sensor/Light bulb.

alamers avatar Sep 20 '21 18:09 alamers

well spotted!

yjeanrenaud avatar Sep 28 '21 19:09 yjeanrenaud

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Oct 08 '21 20:10 github-actions[bot]

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.

github-actions[bot] avatar Oct 09 '21 21:10 github-actions[bot]

can we re-open this issue?

nasa9084 avatar Oct 19 '21 14:10 nasa9084

@donavanbecker

nasa9084 avatar Oct 19 '21 14:10 nasa9084

not close

nasa9084 avatar Oct 30 '21 12:10 nasa9084

Im also having trouble with the same problem while developing in golang...

can we rename MotionSenser property like "brightness" to "dimness"???

waku1123 avatar Jan 16 '22 11:01 waku1123

@waku1123 btw, I wrote switchbot client for golang, which supports current brightness issue, use this if you want: https://github.com/nasa9084/go-switchbot

nasa9084 avatar Jan 18 '22 03:01 nasa9084

@nasa9084 cool!!! This is exactly what I am looking for!

waku1123 avatar Jan 19 '22 11:01 waku1123

no updates here, though?

yjeanrenaud avatar Oct 14 '22 08:10 yjeanrenaud