Open marcelveldt opened 1 year ago
Reproduce as soon as we have the mock controller, it seems that we can't map a few properties for this test device.
You can now reproduce like this:
master
of https://github.com/zwave-js/node-zwave-jsyarn && yarn build
to get everything up to dateserver_config_thermostat_sp.js
yarn mock-server -c server_config_thermostat_sp.js
zwave-js-server
with tcp://localhost:5555
as the pathzwave-js-server
// @ts-check
const {
CommandClasses,
} = require("@zwave-js/core");
const {
ccCaps,
} = require("@zwave-js/testing");
const {
ThermostatMode,
ThermostatSetpointType,
} = require("zwave-js");
/** @type {import("zwave-js/Testing").MockServerOptions["config"]} */
module.exports.default = {
nodes: [
{
id: 2,
capabilities: {
basicDeviceClass: 4, // Routing Slave
genericDeviceClass: 8, // Thermostat
specificDeviceClass: 6, // General Thermostat V2
commandClasses: [
{
ccId: CommandClasses.Version,
version: 3,
},
{
ccId: CommandClasses["Manufacturer Specific"],
version: 1,
},
ccCaps({
ccId: CommandClasses["Thermostat Mode"],
isSupported: true,
isControlled: false,
secure: true,
version: 3,
supportedModes: [
ThermostatMode.Off,
ThermostatMode.Heat,
ThermostatMode["Auto"],
ThermostatMode["Resume (on)"],
ThermostatMode["Auto changeover"],
],
}),
ccCaps({
ccId: CommandClasses["Thermostat Setpoint"],
isSupported: true,
isControlled: false,
secure: true,
version: 3,
setpoints: {
[ThermostatSetpointType.Cooling]: {
minValue: 10,
maxValue: 36,
scale: "°C",
},
[ThermostatSetpointType["Dry Air"]]: {
minValue: -9.87,
maxValue: 56.78,
scale: "°C",
},
[ThermostatSetpointType["Full Power"]]: {
minValue: 20,
maxValue: 32.767,
scale: "°C",
},
},
}),
CommandClasses["Z-Wave Plus Info"],
],
},
},
],
};
If the device has heating mode but not heating setpoint, it means the device setpoint for heating can not be controlled. We should just hide the temperature control in that case.
We can end up in the situation where a device has some setpoint that needs to be set but not (Z-Wave) mode exists for that. Worst case scenario we just make up a new mode to satisfy HA user interface but we don't set it in Z-Wave.
Update: The test no longer throws errors in the UI. I still can't change setpoints though.
What should be done here? Is this related to unknown setpoints as mentioned in the linked PR?
https://github.com/home-assistant/core/pull/102672#issuecomment-1779579882
No, those are valid setpoints and valid thermostat modes, but there's no overlap.
Supported modes:
Supported setpoints:
The assumption in the climate entity that each setpoint has a corresponding mode or vice versa is not correct. There exist several devices for which this assumption does not hold. IIRC @marcelveldt mentioned a discussion with a Matter device manufacturer who also mentioned this?
So IMO the task is (although I'm aware this is not an easy one):
The problem
Problem 1:
I am unable to do this via the UI:
Problem 2:
I also can't do this:
Problem 3:
I am unable to do this via the UI (same check as above, different device):
What version of Home Assistant Core has the issue?
core-2023.6.0.dev20230503
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Z-Wave JS
Link to integration documentation on our website
No response
Diagnostics information
Node diagnostics for problems 1-2: zwave_js-f0926e113c178046d0d249fcdc42964a-Node 68-6c05e6136d5df1f37b82d089e6893a74.json.txt
Node diagnostics for problem 3: zwave_js-f0926e113c178046d0d249fcdc42964a-Node 69-64741301612ea804321abbab07756732.json.txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response