OpenWonderLabs / SwitchBotAPI

SwitchBot Open API Documents
875 stars 73 forks source link

Brightness field is used in different ways #48

Open alamers opened 3 years ago

alamers commented 3 years ago

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.

yjeanrenaud commented 3 years ago

well spotted!

github-actions[bot] commented 3 years ago

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] commented 3 years ago

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

nasa9084 commented 3 years ago

can we re-open this issue?

nasa9084 commented 3 years ago

@donavanbecker

nasa9084 commented 3 years ago

not close

waku1123 commented 2 years ago

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

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

nasa9084 commented 2 years ago

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

waku1123 commented 2 years ago

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

yjeanrenaud commented 2 years ago

no updates here, though?