@@ -11941,28 +11941,36 @@ export const definitions: DefinitionWithExtend[] = [
1194111941 {vendor: "MatSee Plus", model: "PC321-Z-TY"},
1194211942 {vendor: "OWON", model: "PC321-Z-TY"},
1194311943 ],
11944- exposes: [
11945- e.ac_frequency(),
11946- e.temperature(),
11947- e.current(),
11948- e.power(),
11949- e.energy(),
11950- tuya.exposes.energyWithPhase("a"),
11951- tuya.exposes.energyWithPhase("b"),
11952- tuya.exposes.energyWithPhase("c"),
11953- tuya.exposes.voltageWithPhase("a"),
11954- tuya.exposes.voltageWithPhase("b"),
11955- tuya.exposes.voltageWithPhase("c"),
11956- tuya.exposes.powerWithPhase("a"),
11957- tuya.exposes.powerWithPhase("b"),
11958- tuya.exposes.powerWithPhase("c"),
11959- tuya.exposes.currentWithPhase("a"),
11960- tuya.exposes.currentWithPhase("b"),
11961- tuya.exposes.currentWithPhase("c"),
11962- tuya.exposes.powerFactorWithPhase("a"),
11963- tuya.exposes.powerFactorWithPhase("b"),
11964- tuya.exposes.powerFactorWithPhase("c"),
11965- ],
11944+ exposes: (device) => {
11945+ const baseExposes = [
11946+ e.ac_frequency(),
11947+ e.temperature(),
11948+ e.current(),
11949+ e.power(),
11950+ e.energy(),
11951+ tuya.exposes.energyWithPhase("a"),
11952+ tuya.exposes.energyWithPhase("b"),
11953+ tuya.exposes.energyWithPhase("c"),
11954+ tuya.exposes.voltageWithPhase("a"),
11955+ tuya.exposes.voltageWithPhase("b"),
11956+ tuya.exposes.voltageWithPhase("c"),
11957+ tuya.exposes.powerWithPhase("a"),
11958+ tuya.exposes.powerWithPhase("b"),
11959+ tuya.exposes.powerWithPhase("c"),
11960+ tuya.exposes.currentWithPhase("a"),
11961+ tuya.exposes.currentWithPhase("b"),
11962+ tuya.exposes.currentWithPhase("c"),
11963+ tuya.exposes.powerFactorWithPhase("a"),
11964+ tuya.exposes.powerFactorWithPhase("b"),
11965+ tuya.exposes.powerFactorWithPhase("c"),
11966+ ];
11967+
11968+ if (device.applicationVersion >= 132) {
11969+ baseExposes.push(e.numeric("ac_frequency_high_precision", ea.STATE).withUnit("Hz").withValueMin(0).withValueMax(100));
11970+ }
11971+
11972+ return baseExposes;
11973+ },
1196611974 meta: {
1196711975 multiEndpointSkip: ["power_factor", "power_factor_phase_b", "power_factor_phase_c", "energy"],
1196811976 tuyaDatapoints: [
@@ -11981,6 +11989,7 @@ export const definitions: DefinitionWithExtend[] = [
1198111989 [7, null, tuya.valueConverter.phaseVariant2WithPhase("b")],
1198211990 [8, null, tuya.valueConverter.phaseVariant2WithPhase("c")],
1198311991 [134, "device_status", tuya.valueConverter.raw],
11992+ [135, "ac_frequency_high_precision", tuya.valueConverter.divideBy100],
1198411993 ],
1198511994 },
1198611995 },
0 commit comments