length of "state" and sensor value UI states

Posted on
Sat Feb 01, 2020 6:49 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

length of "state" and sensor value UI states

Matt, Jay,

there seems to be a limit in number of characters for these 2 states

for status you can see it in the column width, you can not make it any wider, stops at a certain point, but it looks as it it is just a limit when showing the contents.

When appending several strings to the sensorValue Ui state it seems that if the string gets too long the last one is not getting accepted /added.

could you shine some light on the limits?

Thanks

Karl

Posted on
Sat Feb 01, 2020 9:16 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: length of "state" and sensor value UI states

Can you screen capture what you are seeing? The column width for State does have a maximum, but that should just be for the UI width. If you change the sensorValue to a really long value and then dev.refreshFromServer() and log the sensorValue state does it show lost or truncated data? Off the top of my head I don't think there is an internal limit.

Image

Posted on
Sat Feb 01, 2020 10:20 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: length of "state" and sensor value UI states

sensorValueUI
Screen Shot 2020-02-01 at 22.15.29.png
Screen Shot 2020-02-01 at 22.15.29.png (9.46 KiB) Viewed 985 times

state = sensorValue
Screen Shot 2020-02-01 at 22.15.37.png
Screen Shot 2020-02-01 at 22.15.37.png (6.06 KiB) Viewed 985 times

should be the same

When it is shorter, it works = the last added value works, it is not a data or program problem.
state column:
Screen Shot 2020-02-01 at 22.17.33.png
Screen Shot 2020-02-01 at 22.17.33.png (3.42 KiB) Viewed 985 times

sensorvalueUI
Screen Shot 2020-02-01 at 22.17.38.png
Screen Shot 2020-02-01 at 22.17.38.png (6.48 KiB) Viewed 985 times

Karl

Posted on
Sun Feb 02, 2020 12:50 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: length of "state" and sensor value UI states

Okay, so the problem is that in the Device Details view the Sensor Value is clipped. This is a bit more complex than it looks because unseen in your screenshot is that there can be buttons to the right of those values. Currently they only show for energy usage devices that might need a "reset" (thus a Reset button) and a few other specific cases, but in the future we might have plugin defined buttons there. Anyhow, the point is the width of that field is more narrow than it looks. Indigo should expand it out when there isn't a button, but it isn't that smart currently. I've modified that particular field so that when it truncates now it will show "..." when it hits the limit. Currently it is trying to word wrap which doesn't make sense for a single line field like that, and in cases like your example makes the visible text shown even less than it could be.. So it will be a bit more obvious that it is being truncated in the next version, but not perfect.

Image

Posted on
Sun Feb 02, 2020 1:00 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

length of "state" and sensor value UI states

Ok thanks, that explains it. Don’t worry about it
I just want to understand.
I can work around it.

Karl


Sent from my iPhone using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests