Page 1 of 1

Expanded text attributes for uiValue

PostPosted: Sat Nov 25, 2017 2:56 pm
by berkinet
For custom plugin devices: Allow additional attributes for the updateStateOnServer() uiValue. Presently the uiValue is rendered as simple black text. The only available option is to use setErrorStateOnServer() which renders all text, not just the uiValue text, for the device in red.

When setting the uiValue to be displayed as a custom device/s state, I would like to have an option to set the color value, and possibly a style for the uiValue text. This might be limited to a small set of predefined colors, or ;possibly an arbitrary RGB value. Style options might be bold or italic.

For example:
Code: Select all
dev.updateStateOnServer(key='displayState', value="foobar", uiValue="foobar", uiValColor="orange", uiValStyle="bold)
or...
dev.updateStateOnServer(key='displayState', value="foobar", uiValue="foobar", uiValColor="ff9900", uiValStyle="italic)
And, for the benefit of the imagination impaired :D
    foobar vs foobar vs foobar

Re: Expanded text attributes for uiValue

PostPosted: Sat Nov 25, 2017 3:12 pm
by matt (support)
One issue is that the state text has to be rendered in different visual contexts (Mac UI, Web browser UI, Indigo Touch UI; both light and dark themes, etc.), so some colors may not render well in some visual contexts. So I think if we did something like this it would be more of a style specifier, like uiValueStyle with possible values like: normal, important, notify, caution, error, etc.

Re: Expanded text attributes for uiValue

PostPosted: Sat Nov 25, 2017 3:17 pm
by berkinet
matt (support) wrote:
...I think if we did something like this it would be more of a style specifier, like uiValueStyle with possible values like: normal, important, notify, caution, error, etc.

Sure... well, as long as I got to make some suggestions :wink: