OH3 MainUI: Some badges are reversed (lock/heat)

Hello,

is ist possible to change this badgeConfig for the standard “location” cards ? How ?

Thank you

regards

Hmm mine is set to Point->Switch, but I really can’t tell you if that’s right or wrong.

Thank you for your quick response.
I am relieved that I am not the onle one :wink:

Yes, this is true for my dana lock for instance (see below).
I would love to have the icon flipped:

Can I manually edit this config somewhere?
I did not find this in the jsondb directory.

Hi Yannick,

I have seen various users that confirm that “Locked” is “ON” and “Unlocked” is “OFF” for their locks, I am also one of them. I realize that people with devices where this is flipped would not complain on the forum, so I am not 100% sure. If the badge could be configured somewhere this would also be fine.

Some references:

My devices are “Danalock” locks. So I would vote for 'locked" is “ON” :slight_smile:

Thx for your great work on the OH3 UI, I really like its beauty, flexibility and versatility.

My Popp z-wave doorlock also is ON when LOCKED.
Is there a solution as long as @ysc hasn’t changed the code?

Maybe something like

config:
  label: Home Page
locations:
  - component: oh-locations-tab
    config:
      badges:
        lock:
          expression: state === 'OFF'
3 Likes

That worked, thanks.

This is not a solution to the particular problem posted but perhaps related, and in any case something to keep in mind with these location badges. My location badge showed an open lock regardless of whether the lock switch was ON or OFF. I changed the Semantic Class of the lock switch item from “Switch” to “Point”, and thereafter it worked correctly.

Thanks!
Works perfectly! :slight_smile:

Probably something I don’t understand with this hint.
Tried editing my Home page in the top section to match this example but had no effect. Lock badge still reversed. Using 3.2.0
image

Am I editing in the wrong place/file?

Thanks
Brian

I have the config/badges/lock section placed withing the slots/location section:

    slots:
      Corridor:
        - component: oh-location-card
          config:
            badges:
              lock:
                expression: state === 'OFF'

this works for me on 3.2.0 to reverse the lock badge

2 Likes

So you are looking at your locations tab where it’s inverted, right?

Then go to edit to the right upper corner of the screen and go to the Code tab.
Scroll down to the locations section:

locations:
  - component: oh-locations-tab

and look for the location you are looking at with the lock.
For me it’s entry

      entry:
        - component: oh-location-card
          config:
            backgroundImage: static/backgrounds/eingang.jpg
            badges:
              lock:
                expression: state === 'OFF'

Thanks for the response!
I’m not sure how to revise it given the other badge items in that section.?
Currently mine looks like this.
image.png

How do I add the expression ?

I am not quite sure if the dashs “-” are correct in your code, but it should look like:

            badges:
              lights
              doors
              lock:
                expression: state === 'OFF'
              speakers
              

I suppose…

Thanks
Those dashes have been there since my original 3.0 install. I’ll play around with removing them.

Finally found the solution.
Apparently when you edit the YAML you need remove those lines with the dash

1 Like

There is an equipment-type called RadiatorControl and I think it would be really slick if it had it’s own badge icon, separate from the snowflake HVAC.

How about f7:gauge:

image

or from the material icons,

fireplace might work
image

and hottub sort of looks like a radiator
image

Please do not hijack other topics.
Your change request is not related to the original topic.
Better open a new one.