-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
electricityMeter can only use the default settings #8395
Comments
Are you using the latest z2m? |
Oh, I just updated my z2m and it works now, thank you very much. In addition, I have another problem. I used await endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', { in the converter to change my power unit from kw to w, but it doesn't seem to work now. |
To set the divisor with modern extend, see
|
Hi, @Koenkk I tried these methods, but none of them worked. It seems that the divisor defined in my device will force overwrite what I set in the converter. So can I choose not to change the divisor but change the unit from w to kw? const {electricityMeter} = require('zigbee-herdsman-converters/lib/modernExtend');
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const e = exposes.presets;
const definition = {
zigbeeModel: ['SPM01X001'],
model: 'SPM01X00111',
vendor: 'BITUO TECHNIK',
description: 'Automatically generated definition',
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);
await reporting.readMeteringMultiplierDivisor(endpoint);
await endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {
acPowerMultiplier: 1, acPowerDivisor: 1,
});
},
extend: [electricityMeter({fzMetering: fz.metering,
acFrequency: true,
powerFactor: true,
configureReporting: false,
producedEnergy: true,
power: {divisor: 1, multiplier: 1},
})],
meta: {},
exposes: [
e.power_apparent()
],
};
module.exports = definition; |
Yes! You can confirm that by looking at your |
And if I use So I can only choose to write a converter to force EletricalMeasurementMultiplierDivisors to 1. |
extend: [identify(), onOff({"powerOnBehavior":false}), electricityMeter({
threePhase: true,
producedEnergy: true,
acFrequency: true,
powerFactor: true,
})],
I used this code and applied it to my external converter, but none of these extra settings worked
The text was updated successfully, but these errors were encountered: