architecture icon indicating copy to clipboard operation
architecture copied to clipboard

Climate: merge SUPPORT_TARGET_TEMPERATURE_RANGE into SUPPORT_TARGET_TEMPERATURE

Open balloob opened this issue 4 years ago • 9 comments

Context

A target temperature is a target temperature. If it's set to a range should not matter for support. It's up to the UI to see which one is set and render accordingly.

Proposal

Replace SUPPORT_TARGET_TEMPERATURE_RANGE in the code with SUPPORT_TARGET_TEMPERATURE

Consequences

No user facing things. UI already checks target_temp_min/max values.

balloob avatar Jul 18 '19 21:07 balloob

For reference on how to do the heat, cool, heat_cool dance with just one support flag: https://github.com/elupus/hass_nibe/blob/2334787b1af0a033f186e5f75231099b996d6d55/climate.py#L302

Imho this make sense.

elupus avatar Jul 19 '19 07:07 elupus

Why not remove the range as per this and add one to indicate write/set support. To allow read-only temperatures.

Would allow gui to hide the input boxes.

Google assistant support the concept of read-only data.

elupus avatar Jul 19 '19 10:07 elupus

Note also (related): https://github.com/home-assistant/home-assistant/issues/25267 - this is a climate entity without a target temp at all.

For reference on how to do the heat, cool, heat_cool dance with just one support flag: https://github.com/elupus/hass_nibe/blob/2334787b1af0a033f186e5f75231099b996d6d55/climate.py#L302

Imho this make sense.

I agree.

zxdavb avatar Jul 19 '19 12:07 zxdavb

... and, also:

  • why only max_temp, min_temp?

In honeywell, the target_temperature_high (the system will cool when above the CoolSetpoint) has:

  • CoolLowerSetptLimit, and a
  • CoolUpperSetptLimit

and similarly for target_temperature_low (HeatSetpoint)

zxdavb avatar Jul 19 '19 19:07 zxdavb

max temp and min temp are the maximum and minimum supported values to be set. target_temp_high, target_temp_low are the current set temperatures if it's a range, otherwise use target_temp.

balloob avatar Jul 25 '19 21:07 balloob

If cooling with a range, does that mean that if it's too hot, no cooling is done ?

balloob avatar Jul 25 '19 21:07 balloob

In case its a useful view point:

On HomeKit accessories you can only set a temperature range in heat_cool mode (what it calls auto). If it goes below target_temp_low the heating comes on. If it goes above target_temp_high the cooling comes on.

There are also (i believe) different min_temp/max_temp for the target high and low values. So completely made up numbers but your low target might be between 7 and 18 and your high might be between 20 and 30. Or they might overlap or be the same.

I don't think you can set a range for heat or cool at all, so in that case you'd have to use a different API endpoint with a target_temp. According to the spec it has its own max_temp/min_temp too.

Jc2k avatar Jul 25 '19 21:07 Jc2k

Are target_temperature_low and target_temperature_high for HVAC_MODE_HEAT_COOL ?

Adminiuga avatar Jul 25 '19 22:07 Adminiuga

max temp and min temp are the maximum and minimum supported values to be set. target_temp_high, target_temp_low are the current set temperatures if it's a range, otherwise use target_temp.

[EDITED for clarity]

Honeywell is the same as @jc2k/Homekit I can remember the exact figures, but to give you an idea (in C), if HVAC_MODE_HEAT_COOL(NB: I have not seen one of these in the wild):

  • cooler turned on if above a set value, configurable from 15 to 45, example cool if >25 (eco mode)
  • heater turned on if below a set value, configurable from 5 to 35, example heat if <5 (aka frost protect)

To make it work with HA, I have to set

  • max_temp to 45, and
  • min_temp to 5

So HA appears to let me set target_temperature_high (higher than this, will actively cool) to 12, which below 15?

zxdavb avatar Jul 25 '19 23:07 zxdavb

This architecture issue is old, stale, and possibly obsolete. Things changed a lot over the years. Additionally, we have been moving to discussions for these architectural discussions.

For that reason, I'm going to close this issue.

../Frenck

frenck avatar May 11 '23 13:05 frenck