Skip to content

Commit

Permalink
fix(climate): set controlSequenceOfOperation as a required property
Browse files Browse the repository at this point in the history
fixes #16
  • Loading branch information
t0bst4r committed Oct 29, 2024
1 parent cb7b76c commit 4816273
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
HomeAssistantEntityState,
} from "@home-assistant-matter-hub/common";
import { Behavior } from "@project-chip/matter.js/behavior";
import { Thermostat } from "@project-chip/matter.js/cluster";

export class CoolingThermostatServer extends ThermostatBaseServer(
Base.with("Cooling"),
Expand Down Expand Up @@ -60,6 +61,8 @@ export namespace CoolingThermostatServer {
occupiedCoolingSetpoint: state.targetTemperature,
minCoolSetpointLimit: state.minTemperature,
maxCoolSetpointLimit: state.maxTemperature,
controlSequenceOfOperation:
Thermostat.ControlSequenceOfOperation.CoolingOnly,
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
HomeAssistantEntityState,
} from "@home-assistant-matter-hub/common";
import { Behavior } from "@project-chip/matter.js/behavior";
import { Thermostat } from "@project-chip/matter.js/cluster";

export class DefaultThermostatServer extends ThermostatBaseServer(Base) {}

Expand All @@ -16,6 +17,8 @@ export namespace DefaultThermostatServer {
return {
localTemperature: state.currentTemperature,
systemMode: state.systemMode,
controlSequenceOfOperation:
Thermostat.ControlSequenceOfOperation.CoolingAndHeating,
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
HomeAssistantEntityState,
} from "@home-assistant-matter-hub/common";
import { Behavior } from "@project-chip/matter.js/behavior";
import { Thermostat } from "@project-chip/matter.js/cluster";

export class HeatingAndCoolingThermostatServer extends ThermostatBaseServer(
Base.with("Heating", "Cooling"),
Expand Down Expand Up @@ -83,6 +84,8 @@ export namespace HeatingAndCoolingThermostatServer {
minCoolSetpointLimit: state.minTemperature,
maxHeatSetpointLimit: state.maxTemperature,
maxCoolSetpointLimit: state.maxTemperature,
controlSequenceOfOperation:
Thermostat.ControlSequenceOfOperation.CoolingAndHeating,
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
HomeAssistantEntityState,
} from "@home-assistant-matter-hub/common";
import { Behavior } from "@project-chip/matter.js/behavior";
import { Thermostat } from "@project-chip/matter.js/cluster";

export class HeatingThermostatServer extends ThermostatBaseServer(
Base.with("Heating"),
Expand Down Expand Up @@ -60,6 +61,8 @@ export namespace HeatingThermostatServer {
occupiedHeatingSetpoint: state.targetTemperature,
minHeatSetpointLimit: state.minTemperature,
maxHeatSetpointLimit: state.maxTemperature,
controlSequenceOfOperation:
Thermostat.ControlSequenceOfOperation.HeatingOnly,
};
}
}

0 comments on commit 4816273

Please sign in to comment.