Temperature Scale set for the location

Hi guys,

It seems only Celsius scale is supported for temperature measurement.
When I emit an event with unit=“F” the value is transformed back to “C” and it is always shown in “C” in the application.

<ZigbeeDevice: bad318ca-4d15-434f-9bc0-8632dd577599 [0x042F] (Aqara Dual Switch LLKZMK11LM Edge)> emitting event: {“attribute_id”:“temperature”,“capability_id”:“temperatureMeasurement”,“state”:{“unit”:“F”,“value”:90},“component_id”:“main”}


Have you checked the temperature scale of your location?
Make a GET request to: https://api.smartthings.com/v1/locations/locationId
If it’s “C” and you want to change it to “F”, send a PUT request to the same endpoint with the following payload

  "name": "Home",
  "temperatureScale": "F"
1 Like

@nayelyz Thank you for a quick reply.
My location is indeed in “C”, I was hoping to override this setting for a single device by issuing temperature event in different units.
Is it supported?

Let me verify some details with the engineering team and I’ll get back to you.

1 Like

Hi @ygerlovin, the behavior is expected. If we had the option we would probably go back in time and only allow a single unit for capabilities and handle units only at the presentation layer. The alternative we considered to transforming select units would be to require drivers to be aware of the location temperature scale but this is something we believed would represent a poor separation of concerns and would result in a greater number of defects across the ecosystem.

If you really want to report temperature in another unit than what is used for the location, this could be done via a custom capability for your driver.

1 Like

Thanks @posborne ,

I was trying to create a custom capability, by basically copying temperatureMeasurement presentation, but my capability doesn’t show historical data button.
I was looking at presentation of Power, Energy and Temperature capabilities.
All of them allow not only see the current value, but also the historical data, but I can’t figure out what in presentation tells the platform to collect and/or show it.

Also, voltage measurement shows the color bar. It would be really cool to reuse it for temperature.

Could you please clarify how this could be done?