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 configuration for the reporting type of power in electricityMeter… #8909

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shinasys
Copy link
Contributor

@shinasys
Copy link
Contributor Author

@Koenkk I encountered 'Merging is blocked.' How can I proceed?
Thanks.

@@ -1894,15 +1895,16 @@ function genericMeter(args?: MeterArgs) {
if (args.producedEnergy !== false) exposes.push(e.produced_energy().withAccess(ea.STATE_GET));
fromZigbee = [args.fzElectricalMeasurement ?? fz.electrical_measurement, args.fzMetering ?? fz.metering];
toZigbee = [
tz.electrical_measurement_power,
args.reportingPowerType === "electrical" ? tz.electrical_measurement_power : tz.metering_power,
Copy link
Owner

Choose a reason for hiding this comment

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

Can't we base this off the cluster parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't have a good idea at the moment. I can't find a suitable parameter in the cluster. Do you have any good methods in mind?
Thanks.

Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
args.reportingPowerType === "electrical" ? tz.electrical_measurement_power : tz.metering_power,
cluster === "electrical" ? tz.electrical_measurement_power : tz.metering_power,

I mean this

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.

2 participants