Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temperature calibration range limited to -2.5..2.5° #128253

Closed
jclsn opened this issue Oct 12, 2024 · 5 comments · Fixed by zigpy/zha#329 · May be fixed by zigpy/zha#328
Closed

Temperature calibration range limited to -2.5..2.5° #128253

jclsn opened this issue Oct 12, 2024 · 5 comments · Fixed by zigpy/zha#329 · May be fixed by zigpy/zha#328

Comments

@jclsn
Copy link

jclsn commented Oct 12, 2024

The problem

The temperature calibration is limited by the core to -2.5..2.5°. This is not sufficient for most thermostats and it should be increased to -5..5°.

See here for related issues.

What version of Home Assistant Core has the issue?

core-2024.10.2

What was the last working version of Home Assistant Core?

What type of installation are you running?

Home Assistant OS

Integration causing the issue

zha

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @dmulcahey, @Adminiuga, @puddly, @TheJulianJES, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of zha can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign zha Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


zha documentation
zha source
(message by IssueLinks)

@TheJulianJES
Copy link
Member

It's limited per ZCL spec. Search for LocalTemperatureCalibration in the Zigbee Cluster Library document.
If other thermostats support more, they're doing it out of spec, so we can't know they do. We can manually add them to another ZHA entity class that allows a greater range (-7°C to 7°C): https://github.com/zigpy/zha/blob/17139586ee2ad2f81a11061b6fb9b889422b006e/zha/application/platforms/number/__init__.py#L857-L867

The class should be renamed then if it's not Sonoff specific anymore.

@mrrstux
Copy link

mrrstux commented Oct 26, 2024

Just my 2 cents: with the new Quirks V2 API, I would expect that if a new thermostat device exposes a number entity named "local_temperature_calibration", that metadata overrides any zha thermostat matched config (like the ThermostatLocalTempCalibration).

Currently, when I add that metadata to a v2 quirk (https://github.com/zigpy/zha-device-handlers/pull/2808/files#diff-5ef71546921bf190205a1ab63763070f285bda5da453bf8c071abf5468ac3ed5), I see 2 number entities instead of 1, meaning the override doesn't happen. Or I am doing something wrong while testing?

@mrrstux
Copy link

mrrstux commented Nov 1, 2024

What I believe it happens:

  • ThermostatLocalTempCalibration gets attached as entity to any Thermostat device with unique id: "ieee-endpoint unique id-cluster id-local_temperature_calibration" (link)

  • a quirk v2 number entity which wants to override that gets added with unique id: "ieee-endpoint unique id-local_temperature_calibration" link. It would not match with the one it would want to override, thus it results in 2 distinct entities. The fix would be to harmonize the way the unique id is computed in between those 2. Problem is this part which fails to overwrite entities.

@mrrstux
Copy link

mrrstux commented Dec 15, 2024

Here is a patch that enables entities overwriting: zigpy/zha#328. This is a general solution.
A workaround until the we will have the general solution: zigpy/zha#329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment