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

Sitemap icon rules / icon colors doesnt work when code is generated by MainUI #4431

Open
pergolafabio opened this issue Oct 28, 2024 · 3 comments
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@pergolafabio
Copy link

pergolafabio commented Oct 28, 2024

Hi, as discussed on this community topic here:
https://community.openhab.org/t/cant-get-iconcolor-to-work/159856/36

Seems icon rules and icon colors are not working when generated with MainUI:

example: icon color:
this works using code
Switch icon=if:mdi:lightbulb item=licht_nachthal label="Nachthal" mappings=[ON="Aan", OFF="Uit"] iconcolor=[ON="yellow"]
But it doesnt work when using mainUI, i need to add the additional item name:
Switch icon=if:mdi:lightbulb item=licht_nachthal label="Nachthal" mappings=[ON="Aan", OFF="Uit"] iconcolor=[licht_nachthal==ON="yellow"]

example: icon rules
this works using code:
Switch item=cover_velux_links mappings=[UP="Omhoog ▲", DOWN="Omlaag ▼"] iconcolor=[100="red", 0="green"] icon=[100="if:cbi:tilt-window-closed"] label="Velux Links"

when the code is generated in MainUI:

this doesnt work:
Switch item=cover_velux_links mappings=[UP="Omhoog ▲", DOWN="Omlaag ▼"] iconcolor=[100="red", 0="green"] icon=[100="if:cbi:tilt-window-closed"] label="Velux Links"

Also adding the itemname here doesnt work....
like:
Switch item=cover_velux_links mappings=[UP="Omhoog ▲", DOWN="Omlaag ▼"] iconcolor=[100="red", 0="green"] icon=[cover_velux_links==100="if:cbi:tilt-window-closed"] label="Velux Links"

Your Environment

  • Version used: 4.2.2
  • Environment: Docker
@pergolafabio pergolafabio added the bug An unexpected problem or unintended behavior of the Core label Oct 28, 2024
@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/cant-get-iconcolor-to-work/159856/37

@lolodomo
Copy link
Contributor

Please rename the title "BasicUI icon rules..." into "Sitemap icon rules...".

@pergolafabio pergolafabio changed the title BasicUI icon rules / icon colors doesnt work when code is generated by MainUI Sitemap icon rules / icon colors doesnt work when code is generated by MainUI Oct 28, 2024
@mherwege
Copy link
Contributor

mherwege commented Nov 1, 2024

I will look at this when I have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

No branches or pull requests

4 participants