question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic icons do not work for `Switch`

See original GitHub issue

I have openHAB-Android 2.20.13-beta and in a sitemap Switch item=r label="R" icon="x.svg".

In /etc/openhab/icons/classics I have the files x.svg - x.svg, x-off.svg - x-off.svg, and x-on.svg - x-on.svg.

The basicui displays the icons correctly, it shows either x-on.svg or x-off.svg, depending on the state of the toggle.

OpenHAB-Android displays only x.svg.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
maniac103commented, Jun 27, 2022

Is the request … for sitemap elements without icon=“”?

No, those will yield an empty image without HTTP request. See here … constructing the URL you’re seeing happens right below that part. So the options are

  • omit icon completely -> no HTTP request
  • icon="x" -> GET request for /icon/x.svg?format=... (may also be .png, depending on settings)
  • icon="" -> the GET request you’re seeing

We may want to fix the latter case and treat an empty string the same way as if icon was omitted.

0reactions
maniac103commented, Jun 29, 2022

I’ve opened #2964 for the data saver one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic icons not working for Switch item in HABdroid
In HABdroid, dynamic icons declared as 'Switch' do not reflect the state whereas they do when declared a 'Text'. The items in the...
Read more >
Dynamic icon assigned to a switch item doesn't work ... - GitHub
Assign an icon to a switch item in an .items file and assign it an icon, e.g. ... The dynamic icon does not...
Read more >
Switch with dynamic custom icon - Home Assistant Community
Hi, I'm looking for a switch with a different custom icon for the ON and OFF state. That should look like - platform:...
Read more >
How to enable/disable Divi dynamic icons - Divi Extended
In order to disable Dynamic icons in Divi, navigate to Divi >> Theme Options >> General >> Performance >> Enable Dynamic CSS >>...
Read more >
Dynamic Icons on the iPhone : r/apple - Reddit
As a developer, this does nothing for me. I want to build apps with dynamic icons for the masses, not some silly segment...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found