cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the thermostatTemperatureRange with different mode?

tracyhenryduck
Community Member

Hi, our device is a HVAC type device.

For the key thermostatTemperatureRange, there are two points to set: maxThresholdCelsius, minThresholdCelsius.

But here comes a issue:

In HEAT mode, our device can support 7~26. In Cool mode, our device can support 18.5~33.5.

Should I set the thermostatTemperatureRange with 7, 33.5? If so, when the users adjust the temperature on Google Home App, the temperature range  will be 7~33.5.

Actually, in cool mode, users cannot set the target temperature under 18.5. In heat mode, users cannot set the target temperature greater than 26.

1 Recommended Answer

arm_dpe
Solutions Expert
Solutions Expert

Thanks for reaching out. The Google Smart Home TemperatureSetting trait currently defines thermostatTemperatureRange as a static attribute in the SYNC response. It does not natively support dynamic UI "clipping" (hiding or graying out numbers) based on whether the device is currently in Heat or Cool mode. The industry-standard "workaround" is to combine broad SYNC attributes with strict EXECUTE logic. You set the full possible range in the SYNC response so the UI supports all potential values, then you "limit" the input on your backend:

SYNC Response: Set thermostatTemperatureRange to the absolute minimum and maximum: 7 and 33.5.

EXECUTE Logic: When a user sends a ThermostatTemperatureSetpoint command:

  • If mode is HEAT: Check if the requested value is between 7–26.
  • If mode is COOL: Check if the requested value is between 18.5–33.5.

The Workaround (Error Feedback): If the value is invalid for that mode, return a valueOutOfRange error. Google Home will then show a message to the user (e.g., "Value out of range"), which effectively teaches them the limits of that mode.

View Recommended Answer in original post

2 REPLIES 2

arm_dpe
Solutions Expert
Solutions Expert

Thanks for reaching out. The Google Smart Home TemperatureSetting trait currently defines thermostatTemperatureRange as a static attribute in the SYNC response. It does not natively support dynamic UI "clipping" (hiding or graying out numbers) based on whether the device is currently in Heat or Cool mode. The industry-standard "workaround" is to combine broad SYNC attributes with strict EXECUTE logic. You set the full possible range in the SYNC response so the UI supports all potential values, then you "limit" the input on your backend:

SYNC Response: Set thermostatTemperatureRange to the absolute minimum and maximum: 7 and 33.5.

EXECUTE Logic: When a user sends a ThermostatTemperatureSetpoint command:

  • If mode is HEAT: Check if the requested value is between 7–26.
  • If mode is COOL: Check if the requested value is between 18.5–33.5.

The Workaround (Error Feedback): If the value is invalid for that mode, return a valueOutOfRange error. Google Home will then show a message to the user (e.g., "Value out of range"), which effectively teaches them the limits of that mode.

tracyhenryduck
Community Member

I got it, thank you.