Skip to content
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

Merged
merged 2 commits into from
Jun 27, 2019

Conversation

Hilbrand
Copy link
Member

@Hilbrand Hilbrand commented Jun 12, 2019

Closes #5051

@Hilbrand Hilbrand added the enhancement An enhancement or new feature for an existing add-on label Jun 12, 2019
… and KP400

Closes openhab#5051

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Copy link
Member

@martinvw martinvw left a 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

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
@martinvw martinvw requested a review from a team June 14, 2019 11:42
Copy link
Contributor

@cweitkamp cweitkamp left a 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,
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Member Author

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)

@martinvw martinvw merged commit 93d5a2d into openhab:master Jun 27, 2019
| 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 |
Copy link
Contributor

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.

Copy link
Member Author

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.

knikhilwiz pushed a commit to knikhilwiz/openhab2-addons that referenced this pull request Jul 3, 2019
…, KP400 (openhab#5716)

Closes openhab#5051

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
@wborn wborn added this to the 2.5 milestone Jul 30, 2019
ne0h pushed a commit to ne0h/openhab-addons that referenced this pull request Sep 15, 2019
…, KP400 (openhab#5716)

Closes openhab#5051

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Maximilian Hess <mail@ne0h.de>
Pshatsillo pushed a commit to Pshatsillo/openhab-addons that referenced this pull request Dec 8, 2019
…, KP400 (openhab#5716)

Closes openhab#5051

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
tmrobert8 pushed a commit to tmrobert8/openhab-addons that referenced this pull request Jan 21, 2020
…, KP400 (openhab#5716)

Closes openhab#5051

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Tim Roberts <timmarkroberts@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[tplinksmarthome] Add support for TP-Link HS107, HS300, KP200, and KP400
4 participants