[ST Edge] 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?

The historical data button is part of the custom UI of those standard capabilities, up to now, we cannot edit the UI of the custom capabilities to, for example, add that option or change the design.

Thank you, @nayelyz

I’m not sure I completely understand.
Doesn’t capability presentation define how the capability looks in the App?
Or you mean there are hidden additional presentations elements for stock capabilities, that are not accessable for custom presentations?

What I basically need is to inherit the stock capability and just override units handling

Yes, those special options are not available to add to the custom capability presentation, there’s no property that we could include in the presentation to make the historical button visible.
Also, for example, the battery has a slider display type, but it changes color based on the battery level. This is considered as custom UI for the capabilities as well.

@nayelyz thanks, understood.

Could you please elaborate what are the considerations for such implementation?

Clearly, having different look and feel for stock and custom capabilities is not optimal, to say the least

Our team is working to provide a better experience using custom capabilities, when features like this become available, they are included in the announcements and newsletter so, stay tuned on that.
In the meantime, I’ll share your feedback to the corresponding team.

1 Like