Skip to content

Conversation

@andylinpersonal
Copy link

@andylinpersonal andylinpersonal commented Apr 13, 2025

Description

The attribute MinSetpoint­DeadBand in Thermostat cluster should be a SignedTemperature (int8_t) value, which is in 0.1°C and constrained to [0, +127].
But the function esp_matter::cluster::thermostat::add_bounds_cb erroneously uses TemperatureDifference (int16_t) value with wrong constraint [0, +1270].

Testing

The following snippets should not report the following error:
"Cannot set bounds because of val type mismatch: expected: 7, min: 9, max: 9"

	esp_matter::cluster_t* thermostat_cluster = /* your cluster */;
	esp_matter::cluster::thermostat::feature::auto_mode::config_t auto_config;
	auto_config.min_setpoint_dead_band = 25;
	esp_matter::cluster::thermostat::feature::auto_mode::add(thermostat_cluster, &auto_config);

@CLAassistant
Copy link

CLAassistant commented Apr 13, 2025

CLA assistant check
All committers have signed the CLA.

@andylinpersonal andylinpersonal marked this pull request as ready for review April 13, 2025 11:08
@github-actions github-actions bot changed the title fix(thermostat): MinSetpoint­DeadBand should be SignedTemperature fix(thermostat): MinSetpoint­DeadBand should be SignedTemperature (CON-1634) Apr 13, 2025
@andylinpersonal andylinpersonal force-pushed the fix/wrong-type-of-thermostat-min_setpoint_dead_band branch from 977588b to 00eeb74 Compare April 15, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants