0

We implemented the TemperatureControl trait to change the SetPointTemperature on an oven. Is there a way to set the temperature in Fahrenheit instead of Celsius? The trait settings and states are all in Celsius, but isn't there a way to convert the Fahrenheit value to Celsius before sending it to the fulfillment URL?

We're also not sure what the temperatureStepCelsius attribute applies to, as we were able to set the temperature to 31 degrees even though we had a stepsize of 5 degrees.

Could you please assist us with that?

Best,
Frank

1 Answers1

1

The underlying data format for the TemperatureControl trait uses Celsius universally regardless of language and locale.

Keep in mind that this is the underlying data format. When someone says "Set the temperature to 450", depending on their locale, the number will be interpreted as Fahrenheit and converted for you to Celsius. On your end you're guaranteed to get the temperature as Celsius, and can convert it back if necessary.

If they say "Set the temperature to 31 degrees", then it should be expected to work as long as the number is within the temperatureRange attribute. If you are unable to be that specific, you can take the 31 and do whatever stepping is necessary on your end. The temperatureStepCelsius is more for relative commands like "turn up the oven", where "up" is not a number.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35
  • That's very informative, thanks a lot! Just to be sure, I changed the language on my phone to English(United States), but the Assistant still interprets the temperature value as Celsius. Is there more tweaking that needs to be done for it to recognize it to be a Fahrenheit value? – Frank Schraufstetter Sep 25 '19 at 17:28
  • It's always Fahrenheit for me :\ – Nick Felker Sep 25 '19 at 19:53