Wingnut
(Graham Richards)
October 19, 2022, 1:04pm
1
Any way I can remove the label from underneath a State Badge in a Picture Element card?
I have a floor plan as the picture and I want to show the temperature in each room and the State Badge does it nicely, but I know it’s eg the Lounge Temperature so want to remove the label from under the badge.
- type: picture-elements
image: /local/FloorPlanGround.jpg
elements:
- type: state-badge
entity: sensor.indoor_temperature_lounge
style:
top: 50%
left: 80%
font-size: 10px
Could you use state-label
instead ?
Wingnut
(Graham Richards)
October 19, 2022, 1:26pm
3
Thanks. Just tried it. I’m new to this part of HA.
I quite liked the format of the badge itself but the state-label will work if I fiddle with the format.
Goto card-mod thread → 1st post → link at the bottom → styles for picture elements
balexandre
(Bruno Alexandre)
December 15, 2023, 6:45pm
5
got here for the same thing and instead of the overhelming card-mod
(at least for me) I went with the state-label
instead
type: picture-elements
elements:
- type: state-label
entity: sensor.sonoff_snzb_02d_temperature
style:
top: 56%
left: 76%
font-size: 12px
color: black
font-weight: bold
background-color: white
border: red 2px solid
border-radius: 5px
and I’m showing my picture-elements
as
balexandre:
background-color: white
I would set here smth like “rgba(255,255,255,0.2)”, i.e. semi transparent.
balexandre
(Bruno Alexandre)
December 16, 2023, 11:02am
7
Ildar_Gabdullin:
I would set here smth like “rgba(255,255,255,0.2)”, i.e. semi transparent
That’s a great idea, but I have labels on my map and would make hard to read the temperatures