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

pzemac total energy support #933

Merged
merged 6 commits into from
Mar 12, 2020
Merged

pzemac total energy support #933

merged 6 commits into from
Mar 12, 2020

Conversation

yekm
Copy link
Contributor

@yekm yekm commented Dec 30, 2019

Description:

Related feature request esphome/feature-requests#457

Checklist:

Copy link
Member

@OttoWinter OttoWinter left a comment

Choose a reason for hiding this comment

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

Thanks, this looks quite good already. Just some changes needed to make the linter happy.

esphome/const.py Outdated
@@ -523,6 +524,7 @@
ICON_PERCENT = 'mdi:percent'
ICON_PERIODIC_TABLE_CO2 = 'mdi:periodic-table-co2'
ICON_POWER = 'mdi:power'
ICON_ENERGY = 'mdi:gauge'
Copy link
Member

Choose a reason for hiding this comment

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

These constants are named after their content (and specifically do not mandate any semantic meaning) - so it should be called ICON_GAUGE (which already exists).

But I don't think the gauge icon is good here (total energy is usually not read with a gauge, since it's an accumulated value). I would prefer ICON_FLASH or ICON_CURRENT_ACT

Copy link
Contributor

Choose a reason for hiding this comment

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

@OttoWinter are you agree with ICON_COUNTER?

esphome/const.py Outdated
@@ -340,6 +340,7 @@
CONF_POSITION = 'position'
CONF_POSITION_ACTION = 'position_action'
CONF_POWER = 'power'
CONF_ENERGY = 'energy'
Copy link
Member

Choose a reason for hiding this comment

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

See the lint error in the travis CI log - these constants are in alphabetical order (so you need to put it to the appropriate position)

@sermayoral
Copy link
Contributor

sermayoral commented Jan 24, 2020

I have modified the @yekm pull request to make the linter happy. I have fixed the icon issue choosing the counter icon, if @OttoWinter agrees: yekm#1

Please @yekm accept this pull request in order to get this fantastic feature ASAP.

Regards :-)

@DendelX
Copy link

DendelX commented Jan 24, 2020

Yes please!! , I have been waiting for this functionality for a long time, it would be incredible to have it available in the next version.

@yekm
Copy link
Contributor Author

yekm commented Feb 8, 2020

@OttoWinter evrything looks fine for me. Give some attention to us please.

esphome/const.py Outdated
@@ -550,6 +551,7 @@
UNIT_DEGREE_PER_SECOND = '°/s'
UNIT_DEGREES = '°'
UNIT_EMPTY = ''
UNIT_ENERGY = 'Wh'
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be UNIT_WATT_HOUR (all these constants are named after the unit name, not the name of the quantity, see for example W)

@sermayoral
Copy link
Contributor

LGTM @yekm

Copy link
Contributor

@sermayoral sermayoral left a comment

Choose a reason for hiding this comment

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

LGTM

@rradar
Copy link
Contributor

rradar commented Feb 23, 2020

LGTM

@SeByDocKy
Copy link
Contributor

Hi,

Why the Energy addin is not yet pushed ?. I think it's very usefull .....

@sermayoral
Copy link
Contributor

Hi,

Why the Energy addin is not yet pushed ?. I think it's very usefull .....

We are waiting for an admin to merge this PR.

@SeByDocKy
Copy link
Contributor

Hi,
Why the Energy addin is not yet pushed ?. I think it's very usefull .....

We are waiting for an admin to merge this PR.

It's too long :) :))))) @OttoWinter can you hear us ? ;)

@brandond brandond merged commit c60989a into esphome:dev Mar 12, 2020
@sermayoral
Copy link
Contributor

Thanks @brandond!! :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants