Nice job, but I’ve small wish: can You display .displayState (if defined) instead .state, so that proper formatting will be possible, for setPointItem and currentPointItem ? I know I can do this myself, but for each of Your great new versions, again and again …
thanks for the details.
I’ve found the little bug into the code. The error is by the defintion of the F7-Icon if no heatingModeItm is defined.
sorry for this.
I change the post above with version v1.8.1
I also included the array string for the icon selection.
It works great now! Thank you very much! The only thing I noticed was the location prop needs to be one single phrase, with a broken phrase (like a space in between two words) the pop-up won’t show. For me that is no big deal but just wanted to let you know.
The “pulsing Corona” is also a very nice feature, which I tested with a toggling switch of my office-lamp.
.
The wish of @Sas_Bibic (Translation) could be another interesting feature to make it more comfortable for users of different languages. But I don’t think that this is only done by changing the “state” to “displayState”.
For the moment I’m lucky with your solution and nosy for what is coming next.
Thank you again for your work.Popup menu looks really cool, and heating animation beautiful.
Unfortunately, I observe strange behavior of heating mode icon. On page open it displays default value (thermometer), when I switch to different mode icon switched to assigned to mode (airplane, hand, etc) but then i switch to another page and back to page with widget icon become again basic thermometer.
Widget version is 1.8.1
I am glad. In which German forum did you post it? Just out of interest because I’m from Germany too.
I tried to reproduce the error but didn’t succeed. When I switch between pages the icons stay as defined.
The icons are firmly defined in the code. The states of the string item are defined in the heatingMode array.
The first array key gets the hand_raised icon, the second key gets arrow_2_squarepath icon and the third key gets airplane. If you use more than 3 keys, the key> 3 always gets the thermometer.
I just thought, as your examples mostly shows “Klima Wohnzimmer”
Here’s the link for German-Forum, or here (may be you have to sign in to see the screen-shots)
@doctor64 I don’t know what kind of Thermostats you have, but my AVM-Fritz-Thermostats are “read-only” in the heating-mode. So if you make a change in the widget it will be set back after some seconds.
Changes are only possible inside the Fritz-Box-Web-UI.
Hi @Nico_R!
Sorry for false alarm, it was my fault. I just by old habit use spaces in heatingMode array, enter this:
AUTOMATIC, MANUAL, BOOST, VACATION
But spaces not ignored here, and of course strings “MANUAL” and " MANUAL" not matched, so default icon drawn.
Then I change array to:
AUTOMATIC,MANUAL,BOOST,VACATION
it start working as intended.
I think it will be common problem for people like me, with background in C or similar languages. I put space after comma by reflex! So i think it will be good to note somewhere what spaces not ignored.
Again, thank you very much for your excellent work!
Just a minor issue, and I not sure it related to Heating widget - i got lots of messages in openhab log like this:
[WARN ] [se.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: undefined
Not sure of root source, but get it when I switch to test page with just one widget - heating. Try to define exampleModeItem, (normally i not use it) and seems like warning message stop appearing.
@fibu-freak I use EQ-3 MAX! Basic thermostats - they modes are controllable from OH binding. Anyway, problem is resolved, thank you for hint. You are right, mode item change state after few seconds - from " MANUAL" to “MANUAL”!
Hi Alex,
as I understand the Array (heatingModeArray) and the corresponding Icons should be used in a certain order to interact with the “heatingModeIcon”. So my order is now MANUAL,AUTOMATIC,VACATION,…whateveryouwant:
Hi Nico,
I think there are no errors in your widget, I love it as it is.
It’s only the way to handle it the way you meant.
The warning message:
2021-02-28 13:42:36.771 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: undefined
is from my point of view no error in the widget. I think this message comes up, when your in testing mode (Widgets) and an item which has to be named/assigned in the interaction, isn’t initialized/named/assigned.
Hi @fibu-freak,
I’ll spend some time trying to figure root of problems. Looks like i found something, but, unfortunately, I don’t know how to fix it.
For example, we have in code for example item
display: "=props.exampleModeItem ? '' : 'none'"
So if exampleModeItemnot defined it will be not shown on interface. But code still have
That is not completely right. The error occurs because I refer to an item in expressions which is not defined.
The error is definitely in my code. I’ve tried to ensure it everywhere but quickly forgot in this new lines.
Your guess is completely correct.
I forgot to include the boolean operator in the expressions here.
I have figure the error out and adapt the correct expression in the code.