Not all custom badges are working, what am I doing wrong? Temperature and Humidity won't change

locations:
  - component: oh-locations-tab
    config:
      badges:
        climate:
          badge:
            icon: f7:flame
        garagedoors:
          badge:
            icon: f7:power
        projectors:
          badge:
            icon: f7:keyboard
        humidity:
          badge:
            icon: f7:keyboard

The climate, garagedoors and projectors badge icons all work but the humidity badge just won’t change. This is the same when I try temperature. Can anyone help?

Unfortunately you can only override the following:

  • alarms,
  • lights,
  • windows,
  • doors,
  • garagedoors,
  • blinds,
  • presence,
  • lock,
  • climate,
  • screens,
  • projectors,
  • speakers.

So customising humidity and temperature currently won’t work …

Ok, that seems absolutely Bonkers. Any logic behind that? Also is this documented?

I was hoping to have a full set of my own icons but it seems I’m stuck with the icons openhab have chosen. Which means the ‘look’ won’t be consistent across all badges.

Is this also the same for ‘Lowbattery’? I wasn’t able to change that icon either.

battery should be overridable. temperature, humidity and luminance are handled a bit differently compared to other badges and seems there is a bit of code missing there in order to allow overriding. Should not be to hard to add imho, I can try to prepare a PR if you are willing to test it out :slight_smile:

I was using ‘lowbattery’ but ‘battery’ does indeed work.

If you are able to do a PR to add the functionality for temperature, humidity and luminance I’d be more than happy to test it out!

locations:
  - component: oh-locations-tab
    config:
      badges:
        humidity:
          badge:
            icon: f7:keyboard

In order to try it out, please run

bundle:update org.openhab.ui https://github.com/crnjan/openhab-webui/raw/feature/diff_poc/bundles/org.openhab.ui/target/org.openhab.ui-4.0.0-SNAPSHOT_badge.jar

and

bundle:update org.openhab.ui https://ci.openhab.org/job/openHAB-WebUI/lastSuccessfulBuild/artifact/bundles/org.openhab.ui/target/org.openhab.ui-4.0.0-SNAPSHOT.jar

to revert back to official UI jar, if needed.

I guess you will need OH 4.0 snapshot in order to give it a spin …

1 Like

Awesome, didn’t expect that so quickly. I’ll look to get this tested tonight when I get home from work. Any chance you can point me in the right direction for updating to 4.0? I’ve just done a quick google and couldn’t come up with any instructions.

Cheers

Installing latest snapshot version should do the trick, please check Download openHAB | openHAB for details …

For reference - PR.

I’m still not sure how I update to version 4.0. The instructions only seem to cater for installing a fresh copy. I don’t want to risk breaking my existing build.

Am I just updating to 4.0 to test this or are you looking for a complete new install of 4.0 to test on? I’m happy to do either I’m just not sure what I’m being asked to do.

Which OH version do you currently have?

I’m running 3.4.0 on a raspberry Pi 4 installed using the instructions here openHAB on Linux | openHAB

Please note there might be some other requirements related to upgrade to OH 4.0, i.e. java 17 is now required - so make sure to properly backup your installation before doing changes.

I patched 3.4.2 main ui version too, so hopefully it should work for 3.4.0 too:

bundle:update org.openhab.ui https://github.com/crnjan/openhab-webui/raw/feature/diff_poc/bundles/org.openhab.ui/target/org.openhab.ui-3.4.2-SNAPSHOT.jar

but not sure how to revert to “official” 3.4.0 version if something goes wrong so use at your own risk …

That said, if you still want to upgrade OH to 4.0, there is a section just a bit below where your link from above post is pointing, named Snapshot Release - if you add that repo and call:

sudo apt-get update
sudo apt-get upgrade

your system should be upgraded to latest 4.0 snapshot.
Disclaimer: I never used above method for upgrading since I always use “manual” installation.

I took a full image of my sd card and had a play, I manged to get the 4.0 snapshot. I was missing openhabian-config and found instructions to install it here [SOLVED] Recommended package installation does not work - openhabian-config: command not found - #2 by Bruce_Osborne

I couldn’t get Java 17 working though, I manged to install it but java --version still shows java 11.

I did manage to change the main UI version for 3.4.2 and the pr seems to be working perfectly to me. I’ve been able to change the temperature and humidity badges both globally and per card.

Thanks for your work.

1 Like

For reference, PR was merged so newer snapshot versions should work out-of-the-box, if/when you decide to upgrade, FYI.

1 Like

Thanks @crnjan that’s amazing!