-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Add device classes for electrical measurement #36800
Add device classes for electrical measurement #36800
Conversation
Hi @fabiocastagnino, It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request. Thanks! |
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.
This is a good idea, I think. We have a requirement that changes to our entity model needs approval in an architecture issue.
Please open an issue:
https://developers.home-assistant.io/docs/core/entity#changing-the-entity-model
Also extend our developer docs here:
https://developers.home-assistant.io/docs/core/entity/sensor#available-device-classes
Hi,
|
Does |
Your observation it's correct, but to have a correct power measurement you need both information. |
Just asking :) I think this is fine, cause even we don't have the |
I think it's good to keep power factor separate. |
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.
Please keep all lists sorted 🔡
@bramkragten do we need to add anything in the frontend when adding a new sensor device class? |
If the sensors will just have a unit of measurement, I think we don't have to change anything. |
Do we want to set a specific default icon per class? |
Yes, we can use: PR: home-assistant/frontend#6193 |
PR: home-assistant/frontend#6193 ready |
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. Otherwise looks good.
Hi @fabiocastagninohorsa, It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request. Thanks! |
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.
Looks good!
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.
Someone needs to restart the CI
If the branch is rebased the new CI should run automatically. |
(cherry picked from commit 2409fe19ed43bef568a0cca826652867d3a2d71a)
I've squashed and rebased the branch, waiting for CI |
It seems the sensor device automations use the unit of measurement in the automation description. @balloob what do you suggest? |
Let's set |
ok, tomorrow I'll push the change in all PR |
ready |
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!
Proposed change
I want to add 4 new device_classs, to handle the electrical measurement
fixes home-assistant/architecture#397
Type of change
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
The integration reached or maintains the following Integration Quality Scale: