Any help would be appreciated I am rather new to this. I have a room-card that I want to conditional change color from green when Charging to blue when not. Here is my current code.
I’m really liking the room card and learning along the way. How do I move the info entity closer to the corner of the card or at least align it with the title?
That’s how I create the value dependent colors for humidity and temps. You need to keed the correct order of the >= statements from biggest to smallest value!
- entity: sensor.az_hygro_humidity
format: precision0
styles:
template: >
if (entity.state < 40) return 'color: orange'; if (entity.state >=
70) return 'color: red'; if (entity.state >= 55) return 'color:
orange'; if (entity.state >= 40) return 'color: green';
- entity: sensor.az_hygro_temperature
format: precision1
styles:
template: >
if (entity.state < 20) return 'color: blue'; if (entity.state >= 24)
return 'color: red'; if (entity.state >= 22) return 'color: orange';
if (entity.state >= 20) return 'color: green';
Hello, I apologize for my confusion, but how can you change the font size of the entity name? I was able to figure out how to change the style of the card title and the info-entities, but for some reason I have been having difficulty figuring out the entity name. The default font sizes are just a little too small for my eyes, so if there are other solutions to increasing them a little I’d be happy to look into them. Thank you!
I have noticed that in Home Assistant Android app (v2023.10.2-full) when I open a view with custom:room-card on it, it scrolls the view to the top on every entity update. Steps to reproduce:
Add a few cards to some view so that the content needs to be scrolled on your mobile.
Scroll to the bottom. After a short pause the content is scrolled to the top
The problem is it works on PC’s Chrome browser and on phone’s HA Companion app, but not on Fully Kiosk Browser. Has anyone experience card-mod effects not being displayed on FKB with a solution? Thanks.
Here’s what I’m using to tweak the spacing on some things. Specifically take a look at the .entities-info-row .entity section. Changing the left margin will squeeze them together a bit. I’ve never tried Fully Kiosk Browser, but the CSS I have works in Chrome, Firefox, and Safari on MacOS and iOS. I’d like to believe that’s a pretty good indication it would work for you.
Thank you for this amazing card! I’ve created a whole new dashboard around it and am very happy.
I do have at least one question as to the functionality that I am unsure how to implement: I have configured the main entity behind every one of my room cards to be a sensor that tracks the number of lights turned on in that room. This works well and appears to be easily maintained through HA templates. What I would love to do, is to have this number show up as a tiny little badge in the overall room icon (the icon that comes from the main entity)
How is this possible? I know 0 about css, but am a professional developer… I think I was just able to control the style/spacing with the ‘styles’ customization, right? Is it possible for me to inject the value of the state from the main entity into the overall on top of the icon of the main entity?
Hello, it’s possible to format entities with show_state: false to match their names? I want to have this four names in “same row” but I didn’t figure out how to do that, I tried to use some negative margins, but with no success.
And I also tried to change state name for the Thermostat battery. It has two states (off/on), but I would like to “map” this values to (Normal/Low). I was able to change the icon color according to state of the value, but not the text itself.
I tried this, which does not work, but I guess the return statement is wrong:
styles:
template: >
if (entity.state == 'off') return entity.state == 'Normal';
if (entity.state == 'on') return entity.state == 'Low';
Hi guys, since the 2024.2.0 update all my battery level entities changed icons:
If I tell it to use the battery icon, the state color still works, but the icon doesn’t change its filled state. Does anyone know why the default icons changed?