Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/lib/inovelli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type {Parameter} from "zigbee-herdsman/dist/zspec/zcl/definition/tstype";
import * as fz from "../converters/fromZigbee";
import * as tz from "../converters/toZigbee";
import * as exposes from "./exposes";
import {logger} from "./logger";
import * as m from "./modernExtend";
import * as reporting from "./reporting";
import * as globalStore from "./store";
Expand Down Expand Up @@ -653,6 +654,12 @@ const inovelliExtend = {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, [INOVELLI_CLUSTER_NAME]);

await endpoint

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This block is located in a fairly generic device parameters section that is parameterized. I don't really like the fact that this is hard coding a specific attribute in the middle of that rather than extending the parsmeterization to include setting the reporting as well.

@adamawolf adamawolf Jul 12, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the feedback. Is there an existing attribute to which I can refer for example that is parameterized the way you would like to see for this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@rohankapoorcom took a stab. I think this is a bit closer to what you mean but please let me know.

.configureReporting(INOVELLI_CLUSTER_NAME, [
{attribute: 32, minimumReportInterval: 1800, maximumReportInterval: 3600, reportableChange: 5},
])
.catch((e) => logger.warning(`Failed to configure internalTemperature reporting: ${e.message}`, "zhc:inovelli"));

let endpoint2: Zh.Endpoint | undefined;
if (splitValuesByEndpoint) {
endpoint2 = device.getEndpoint(2);
Expand Down
13 changes: 11 additions & 2 deletions test/inovelli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2182,6 +2182,7 @@ describe("Inovelli VZM31-SN definition integration", () => {
configureReporting: {
1: [
{cluster: "genOnOff", items: [{attribute: "onOff", min: 0, max: 3600, change: 0}]},
{cluster: "manuSpecificInovelli", items: [{attribute: 32, min: 1800, max: 3600, change: 5}]},
{cluster: "haElectricalMeasurement", items: [{attribute: "activePower", min: 15, max: 3600, change: 1}]},
{cluster: "seMetering", items: [{attribute: "currentSummDelivered", min: 15, max: 3600, change: 0}]},
],
Expand Down Expand Up @@ -2408,6 +2409,7 @@ describe("Inovelli VZM30-SN definition integration", () => {
configureReporting: {
1: [
{cluster: "genOnOff", items: [{attribute: "onOff", min: 0, max: 3600, change: 0}]},
{cluster: "manuSpecificInovelli", items: [{attribute: 32, min: 1800, max: 3600, change: 5}]},
{
cluster: "haElectricalMeasurement",
items: [
Expand Down Expand Up @@ -2691,6 +2693,7 @@ describe("Inovelli VZM32-SN definition integration", () => {
configureReporting: {
1: [
{cluster: "genOnOff", items: [{attribute: "onOff", min: 0, max: 3600, change: 0}]},
{cluster: "manuSpecificInovelli", items: [{attribute: 32, min: 1800, max: 3600, change: 5}]},
{
cluster: "haElectricalMeasurement",
items: [
Expand Down Expand Up @@ -2916,7 +2919,10 @@ describe("Inovelli VZM35-SN definition integration", () => {
writeCount: {1: 0, 2: 0},
// fan() extend also configures onOff reporting on EP1; no other reporting clusters for VZM35-SN.
configureReporting: {
1: [{cluster: "genOnOff", items: [{attribute: "onOff", min: 0, max: 3600, change: 0}]}],
1: [
{cluster: "genOnOff", items: [{attribute: "onOff", min: 0, max: 3600, change: 0}]},
{cluster: "manuSpecificInovelli", items: [{attribute: 32, min: 1800, max: 3600, change: 5}]},
],
2: [],
},
});
Expand Down Expand Up @@ -3036,7 +3042,10 @@ describe("Inovelli VZM36 definition integration", () => {
writeCount: {1: 0, 2: 0},
// light() configures onOff reporting on EP1; fan() configures onOff reporting on EP2.
configureReporting: {
1: [{cluster: "genOnOff", items: [{attribute: "onOff", min: 0, max: 3600, change: 0}]}],
1: [
{cluster: "genOnOff", items: [{attribute: "onOff", min: 0, max: 3600, change: 0}]},
{cluster: "manuSpecificInovelli", items: [{attribute: 32, min: 1800, max: 3600, change: 5}]},
],
2: [{cluster: "genOnOff", items: [{attribute: "onOff", min: 0, max: 3600, change: 0}]}],
},
});
Expand Down
Loading