Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget expressions: (Partly) Fix handling of Item name being undefined #2301

Merged

Conversation

florian-h05
Copy link
Contributor

When using the @ and @@ shortcuts for Item displayState and state in widget expressions, properly handle cases where the Item name is undefined.
Unfortunately I did not find a way to improve that for items[itemName] expressions.

Requesting the Item state from the server when the Item name is undefined leads to warnings in the log (which might cause some confusion for the users):

[WARN ] [se.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: undefined

@florian-h05 florian-h05 requested a review from a team as a code owner February 2, 2024 21:28
…e is undefined

When using the `@` and `@@` shortcuts for Item displayState and state in widget expressions,
properly Item name undefined.
Unfortunately I did not find a way to improve that for `items[itemName]` expressions.

Requesting the Item state from the server when the Item name is undefined leads to warnings in the log:
```
[WARN ] [se.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: undefined
```

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the widget-expression-item-undefined branch from 4af6f9b to 41164ea Compare February 2, 2024 21:29
@florian-h05 florian-h05 added bug Something isn't working enhancement New feature or request main ui Main UI labels Feb 2, 2024
@florian-h05 florian-h05 changed the title Widget expressions: Improve handling of Item name being undefined Widget expressions: (Partly) Fix handling of Item name being undefined Feb 2, 2024
@florian-h05 florian-h05 added this to the 4.2 milestone Feb 2, 2024
@florian-h05 florian-h05 removed the enhancement New feature or request label Feb 2, 2024
Copy link

relativeci bot commented Feb 2, 2024

Job #1398: Bundle Size — 11MiB (~+0.01%).

9918205(current) vs 287009e main#1395(baseline)

Warning

Bundle contains 19 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
Job #1398
     Baseline
Job #1395
Regression  Initial JS 1.84MiB(~+0.01%) 1.84MiB
No change  Initial CSS 607.73KiB 607.73KiB
Change  Cache Invalidation 16.74% 18.72%
No change  Chunks 220 220
No change  Assets 242 242
No change  Modules 3074 3074
No change  Duplicate Modules 159 159
No change  Duplicate Code 1.74% 1.74%
No change  Packages 150 150
No change  Duplicate Packages 18 18
Bundle size by type  Change 1 change Regression 1 regression
                 Current
Job #1398
     Baseline
Job #1395
Regression  JS 9.19MiB (~+0.01%) 9.19MiB
Not changed  CSS 888.86KiB 888.86KiB
Not changed  Fonts 526.1KiB 526.1KiB
Not changed  Media 295.6KiB 295.6KiB
Not changed  IMG 140.74KiB 140.74KiB
Not changed  HTML 1.24KiB 1.24KiB
Not changed  Other 871B 871B

View job #1398 reportView florian-h05:widget-expression-it... branch activityView project dashboard

@florian-h05
Copy link
Contributor Author

FYI @rkoshak IIRC you suggested to reduce the level of that message to info. I have now partially fixed the root cause.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 merged commit 1e1ef59 into openhab:main Feb 2, 2024
6 checks passed
@florian-h05 florian-h05 deleted the widget-expression-item-undefined branch February 2, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant