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

Fix unknown power source for WSP403 #5750

Merged
merged 2 commits into from
May 15, 2023

Conversation

sbeca
Copy link
Contributor

@sbeca sbeca commented May 14, 2023

The Oz Smart Things whitelabel of WSP403 reports an unknown power source. The WSP403 is a smart plug that is always connected to mains so this PR adds a check for that, as well as adding a whiteLabel entry for good measure.

devices/owon.js Outdated
@@ -121,6 +122,11 @@ module.exports = [
await reporting.instantaneousDemand(endpoint, {min: 5, max: constants.repInterval.MINUTES_5, change: 2}); // divider 1000: 2W
await reporting.currentSummDelivered(endpoint, {min: 5, max: constants.repInterval.MINUTES_5,
change: [10, 10]}); // divider 1000: 0,01kWh

if (device.powerSource === 'Unknown') {
device.powerSource = 'Mains (single phase)';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this if check, for a power plug we can assume it is always main powered.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just pushed a new commit that removes the check

@Koenkk Koenkk merged commit 4f4a61a into Koenkk:master May 15, 2023
1 check passed
@Koenkk
Copy link
Owner

Koenkk commented May 15, 2023

Thanks!

@sbeca sbeca deleted the fix-WSP403-power-source branch May 15, 2023 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants