-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tplinksmarthome] Added support for power outlets HS107, HS300, KP200, KP400 #5716
Conversation
… and KP400 Closes openhab#5051 Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2219525
to
f3f642d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small comments, thanks for the PR
.../main/java/org/openhab/binding/tplinksmarthome/internal/TPLinkSmartHomeDiscoveryService.java
Show resolved
Hide resolved
bundles/org.openhab.binding.tplinksmarthome/src/main/resources/ESH-INF/thing/HS300.xml
Show resolved
Hide resolved
bundles/org.openhab.binding.tplinksmarthome/src/main/resources/ESH-INF/thing/channels.xml
Outdated
Show resolved
Hide resolved
.../src/test/java/org/openhab/binding/tplinksmarthome/internal/device/PowerStripDeviceTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. One question inside. Otherwise: LGTM.
@@ -103,7 +103,7 @@ private HasErrorResponse handleDecimalType(String channelID, Connection connecti | |||
return null; | |||
} | |||
|
|||
private TransitionLightStateResponse handleColorTemperature(Connection connection, int colorTemperature, | |||
private @Nullable TransitionLightStateResponse handleColorTemperature(Connection connection, int colorTemperature, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the connection
property has been moved to the super class SmartHomeDevice
can it be removed here - and elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes makes sense. I've removed the connection
and configuration
parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok got merged before I could add 😄 (I've create a new pr: #5766)
| brightness | Dimmer | Set the brightness of Smart Home device or dimmer. | HS220, KB100, KL110, KL120, LB100, LB110, LB120, LB200 | | ||
| colorTemperature | Dimmer | Set the color temperature of Smart Home light. | KB130, KL120, KL130, LB120, LB130, LB230 | | ||
| color | Color | Set the color of the Smart Home light. | KB130, KL130, LB130, LB230 | | ||
| power | Number | Actual energy usage in Watt. | HS110, HS300, KLxxx, LBxxx | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A second question: Why don't you use UoM here. Are there plans to introduce it for this binding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering about that too recently 😄 The original implementation (for HS110) is from before UoM and the others just reuse the code. I was thinking about making them UoM, although it's also a breaking change for the HS110. But I was planning to change it after this pr was being merged.
…, KP400 (openhab#5716) Closes openhab#5051 Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
…, KP400 (openhab#5716) Closes openhab#5051 Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl> Signed-off-by: Maximilian Hess <mail@ne0h.de>
…, KP400 (openhab#5716) Closes openhab#5051 Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
…, KP400 (openhab#5716) Closes openhab#5051 Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl> Signed-off-by: Tim Roberts <timmarkroberts@gmail.com>
Closes #5051