gas meter state updated to made it HA friendly#11079
Merged
Koenkk merged 2 commits intoKoenkk:masterfrom Dec 23, 2025
Merged
Conversation
Koenkk
reviewed
Dec 22, 2025
| if (args.power !== false) exposes.push(e.numeric("power", ea.STATE_GET).withUnit("m³/h").withDescription("Instantaneous gas flow in m³/h")); | ||
| if (args.energy !== false) exposes.push(e.numeric("energy", ea.ALL).withUnit("m³").withDescription("Total gas consumption in m³")); | ||
| if (args.power !== false) | ||
| exposes.push(e.numeric("volume_flow_rate", ea.STATE_GET).withUnit("m³/h").withDescription("Instantaneous gas flow in m³/h")); |
Owner
There was a problem hiding this comment.
This change is not acceptable since it makes energy exposed as gas for electricity meters, is the change in gas_metering not enough?
Contributor
Author
There was a problem hiding this comment.
If I'm not mistaken, line 2232 is applicable only to "gas" type meters as restricted in line 2231. Note the value of the "type" argument is provided in lines 2351 (electricity) and line 2371 (gas) respectively.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Hi, I'm slowly moving forward with the implementation of the Zigbee Gas Meter and found some changes to contribute to the repository in order to make the code more Home Assistant friendly.
The root of the problem:
Personally I don't like how Home Assistant requires us to change values from the zigbee specification to their interpretation of the world but this is current state of the situation so this is why I'm proposing this PR
Regards
Ignacio