SmartThingsCommunity / SmartThingsEdgeDrivers

Apache License 2.0
268 stars 461 forks source link

Use rpc to check if larger temp range can be used #1757

Open nickolas-deboom opened 1 week ago

nickolas-deboom commented 1 week ago

Type of Change

Checklist

Description of Change

CHAD-14205

For RPC version >= 6, the edge drivers can always assume that temperature values received from the setTemperatureSetpoint command are in Celsius. We can therefore allow a larger range for setpoint values in the driver, because we no longer need to be concerned about the Celsius and Fahrenheit scales overlapping. This PR introduces new limits depending on the RPC version, which are larger than the current ranges, but still limit the setpoint range values as a type of "sanity check" on the values received from the device (sometimes the values from the device are not set, or are not reasonable). Please offer any feedback if you have any opinions on different values that should be used for each device type.

Summary of Completed Tests

See new unit tests.