Thermostat Device - Ui Display Values

Posted on
Thu Oct 18, 2018 7:34 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Thermostat Device - Ui Display Values

I am experimenting with showing two sensor values for my TRV thermostat device i.e. from the TRV and from the Remote Stat.

If I just have one sensor, it takes note of the uiValue when I update the state e.g.:
  • 'uiValue': '{:.1f} °C'.format(tempValue) which results in 27.3 °C

However, if I have two sensors, the values shown are e.g:
  • 23.9, 23.7
There doesn't appear to be anyway to get the values displayed showing a trailing °C
This is in the State column and also in the Device Details section alongside Temperature

I have also tried setting up a <UiDisplayStateId>temperatureUi</UiDisplayStateId> entry in the Devices.xml which doesn't appear to work.
This even though I have the state showing in the custom states list e.g.
  • T: 23.9 °C, R: 23.7 °C


TRV - UI Values.png
TRV - UI Values Question
TRV - UI Values.png (406.28 KiB) Viewed 747 times
It seems like Indigo is ignoring the <UiDisplayStateId> for a thermostat device or of course It may be a bug in my code. :wink:

Posted on
Thu Oct 18, 2018 9:46 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Thermostat Device - Ui Display Values

What is shown in the main window state UI column for thermostats depends on what the thermostat supports in this order: multiple temperatures, single temperature, cool/heat setpoint, cool setpoint, heat setpoint. In the case of multiple temperatures it does indeed use the raw numerical value (not uiValue). I'll look into improving that.

We probably don't have this adequately documented, but the UiDisplayStateId property only works for custom plugin type devices. If you are using one of the native types (thermostat, sensor, dimmer, etc.) then the logic of what is shown in the Main Window UI cannot be overridden. This is partially by design for consistency, but I'm willing to entertain the notion we should allow it for all device types.

Image

Posted on
Thu Oct 18, 2018 10:08 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Thermostat Device - Ui Display Values

matt (support) wrote:
... In the case of multiple temperatures it does indeed use the raw numerical value (not uiValue). I'll look into improving that.
That would be good. :)

Something else I have noticed is that for a real physical device single sensor thermostat (Spirit, Popp etc), the State column might show e.g. 24.42 °C but the Device Details > Temperature shows 24.4 °. It looks like the C (in this case) is getting dropped. Also I think it would be useful to restrict the temperature to 1 decimal digit in the State Column as that is what is shown in the Device Details and is easier to read.

matt (support) wrote:
... but I'm willing to entertain the notion we should allow it for all device types.
I think that would be good as you are encouraging plugin developers to base their plugin devices on the indigo pre-defined device types. :)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests