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

Improve state generation logic when fetching icons #3456

Merged
merged 4 commits into from
Aug 31, 2023

Conversation

maniac103
Copy link
Contributor

@maniac103 maniac103 commented Aug 14, 2023

Add support for openhab/openhab-core#3735, format numeric state according to pattern (as mentioned here), and make logic a bit easier to understand.

Fixes #3404, #3461

@maniac103
Copy link
Contributor Author

Draft because I didn't test it yet.

If set, icon state should not be included when fetching the icon for a
given widget.

See openhab#3404

Signed-off-by: Danny Baumann <[email protected]>
BasicUI set a predecent for doing so, and users are relying on that
behavior.

Fixes openhab#3461

Signed-off-by: Danny Baumann <[email protected]>
@maniac103 maniac103 marked this pull request as ready for review August 31, 2023 07:33
@maniac103
Copy link
Contributor Author

Gave it a try on my home sitemap, looks OK as far as I can tell.

@Fejitatete
Copy link

Thank you for your work

@mueller-ma
Copy link
Member

@maniac103 Feel free to merge this. I don't have enough time to test this, but from a quick review it looks good to me.

@maniac103
Copy link
Contributor Author

@mueller-ma OK. I guess/hope we'll get feedback from next beta if anything is off.

@maniac103 maniac103 merged commit cc4d18a into openhab:main Aug 31, 2023
@lolodomo
Copy link
Contributor

lolodomo commented Sep 9, 2023

@maniac103 @mueller-ma : regarding the state passed to the icon servlet, do you know if we are passing always the same state value in the Android app and Basic UI ? I hope we are consistent.

@maniac103
Copy link
Contributor Author

I know that I don't know ;-) I would hope so, but I don't have a good idea on how to find out or even enforce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic icons causing way too many requests
4 participants