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

Add support for Home Assistant energy statistics #8187

Merged
merged 3 commits into from
Jul 31, 2021

Conversation

frenck
Copy link
Contributor

@frenck frenck commented Jul 30, 2021

Adds support for Home Assistant energy statistics.

Support for the MQTT part @ Home Assistant has been added in the previous release already, so this does not depend on a future release (and should be backward compatible anyways).

Statistics support for other sensors with current values, already has been added in a previous PR / Zigbee2MQTT release. This only affects "energy" sensors at this point.

See:

As the Zigbee energy sensors should not be resettable, it sets the last_reset_topic to satisfy the configuration and last_reset_value_template contains a static string with an iso formatted epoch 0 timestamp. It is not a template, Home Assistant will recognize that, skip the template parsing and just use the string as the result directly.

I have not been able to test this in real life, as I do not own any Zigbee devices that provide this data.

@Koenkk
Copy link
Owner

Koenkk commented Jul 31, 2021

Thanks!

@Koenkk Koenkk merged commit be2689e into Koenkk:dev Jul 31, 2021
@frenck frenck deleted the frenck-2021-2077 branch August 2, 2021 08:38
@DavidFFerreira
Copy link

stil...mine are unknow too, since I update z2m edge yesterday

@frenck
Copy link
Contributor Author

frenck commented Aug 2, 2021

@DavidFFerreira That issue is tracked here: #8201

Thanks 👍

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.

3 participants