Skip to content

Conversation

drc38
Copy link
Collaborator

@drc38 drc38 commented Jul 20, 2021

Switched to presenting overall current, rather than average phase current for consistency between single and 3 phase chargers, so that overall charger real power = power.factor x current.import x voltage.

@github-actions
Copy link

🎉 HACS repository validator action summary 🎉
✅ The repository is not archived
✅ manifest.json file exist
✅ All required keys are present in manifest.json
✅ hacs.json has the 'name' key set
✅ The repository has a description
⚪ Ignored check: brands
✅ The repository has topics
✅ The repository has issues enabled
✅ This day ends with an 'y' (Tuesday)
✅ README.md exists
✅ Requirements validation
✅ Python wheels
✅ HACS load check

self._metrics[metric] = round(sum / 3, 1)
else:
self._metrics[metric] = round(sum, 1)
self._metrics[metric] = round(sum, 1)
Copy link
Owner

Choose a reason for hiding this comment

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

Why round here? I assume it is for presentation purposes only, so maybe better do that in the sensor entity?
We could extend the upcoming Metric class to have a format, besides value and unit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, only reason is presentation. Agree it would be better to handle format in the sensor. If sensor formats then other round functions can be removed from api also.

@lbbrhzn lbbrhzn merged commit d00ad5d into main Jul 21, 2021
@lbbrhzn lbbrhzn linked an issue Jul 21, 2021 that may be closed by this pull request
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.

Support for 3 phases
2 participants