Custom card: Room Card

Love the Card - thank you!

but I still don’t know how to style the Name of the entities (like Ceiling, Desk)

the info row is working with

.entities-info-row .entity {
  font-size: 18px;
}

example

as a workaround it works with
.content-left .entity {
font-size-adjust:0.8

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?

TIA!

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';

Thank you for your feedback. Unfortunately, it doesn’t work on FKB. Probably it’s the problem with FKB itself.

I’m having the exact same issue, did you ever find a solution?

Hi guys, since the 2024.2.0 update all my battery level entities changed icons:
image
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?

unfortunately no!. I have to change to mushrooms card and it works great no issue!

Had same problem. I updated the room card in HACS

1 Like

I had the same issue after 2024.2, but looks like Room Card was updated and it’s been fixed

Just got the update, fixed it for me as well.

Using HA for over 2 years now, and only today I found out about this card. Thanks for creating it. It looks awesome !

In the wiki I read that I could use format: duration to display the time since an entity has changed state, but I can’t find out how exactly to use it, because nothing shows.
Also, when I try to display a timer, I get ‘active’, ‘idle’, … and not the exact (remaining) time.

Help for one or both things above is more than welcome.

I am having a devil of a time trying to get the custom:slider-entity-row working in a room card. I had this working last year, but somehow have managed to break this feature on all of my room cards.

The slider is working on an entities card, but when I add it to a room card, all I get are icons. I believe to get the sliders to show, it required a long press on one of the icons.

I get this when I do a long press


This is what the entities card looks like

2 quick questions. 1) is there a way to make the icons larger? On my tablet they are tiny. And 2) is there a way to template the info_entities state value? E.g. if the state is stopped I want to to actually say off… or something.

Do you mean like this?

image

@marcokreeft87 Thanks for putting this card together. I am of the thought that this card is a glance card on steroids ( or at least that is the way I am using it). I don’t actually want to be able to control any devices from the card, that said I have run into a few challenges and hope you might help me sort them out.

1)Tap Action navigation only appears to work on the title in my current setup. Given my use case can it be that if tap action for individual entities is not specified that tapping on any part of the card would result in me navigating to a subview?

  1. Somewhat tied to the first; is it possible to have a true/false groups settings for info entities and also for the entities section. That way a setting in those 2 sections can be cascaded down if that s what the individual wants to accomplish?

Here is what I am working with currently

title: Garage
card_styles:
  '--ha-card-header-font-size': 20px;
info_entities:
  - sensor.garage_air_temperature_4
  - sensor.garage_humidity_4
tap_action:
  action: navigate
  navigation_path: /dashboard-mobile/0
entities:
  - entity: binary_sensor.garage_door_inside_contact
    state_color: true
    name: Inside
  - entity: binary_sensor.garage_side_door_contact
    state_color: true
    name: Outside
  - entity: cover.garage_door_controller
    state_color: true
    name: Main
  - entity: lock.garage_side_door
    state_color: true
    name: Side Door
  - entity: lock.laundry_garage_door
    state_color: true
    name: Laundry Door
  - entity: binary_sensor.garage_smoke_carbon_monoxide_detected
    state_color: true
    name: CO2
  - entity: binary_sensor.garage_smoke_smoke_detected
    state_color: true
    name: Smoke
  - entity: null
    state_color: true
    name: TV
    icon: mdi:television
  - entity: null
    state_color: true
    name: null
    icon: mdi:speaker
  - entity: binary_sensor.garage_motion_detection_4
    state_color: true
    name: Motion
  - entity: light.garage_lights
    state_color: true
    name: Lights

Hi all,
I have the room temperature and humidity as info entities on my room-cards.
Now, i want to compare different sensors (absolute humidity inside and outside), to influence the color of the humidity state:

If the absolute humidity inside is higher than outside, the room humidity should become green. → Good time for ventilation
If absolute humidity inside is lower than outside, the room humidity should become red. → Bad time for ventilation

The Code from Mazi0´s post looked very promising:

I tried to adjust it to my needs:

info_entities:
  - entity: sensor.thermostat_bad_humidity
      format: precision0
      styles:
        template: >
          if (states('sensor.thermal_badezimmer_absolute_luftfeuchtigkeit') < states('sensor.thermal_aussen_absolute_luftfeuchtigkeit')) 
          return 'color: green';
          if (states('sensor.thermal_badezimmer_absolute_luftfeuchtigkeit') >= states('sensor.thermal_aussen_absolute_luftfeuchtigkeit')) 
          return 'color: red';

But this is not working. I am sure, the states need to be entered different, but i do not know how. Maybe someone has a solution?

Hi, how solve this? i want change font-size of entity

I want to hide my lights when the sun is above the horizon, which works.
I also have a notification light which pops up sometimes, this increases the number of lights switched on in the room to above zero. Using that seperate also works, but the combination doesn’t.

    hide_if:
      conditions:
        - condition: equals
          entity: sensor.study_lights_on
          value: 0
        - condition: above
          entity: sun.sun
          attribute: elevation
          value: 0

So the first value == 1 and the second above horizon.
But it still hides while I expected it to show, does it do OR instead of AND?
Any help appreciated.

i love how you have your room cards setup…i have the integration and everything working, but when i copy any card yaml into a card…it shows nothing…could you show your card yaml?

Hi Mike, did you try the examples (substituting your own sensors) from this link ?
https://github.com/marcokreeft87/room-card/wiki/Configuration

If you want to add another card into the room-card you can first create as a standalone card in the editor and then copy the yaml over to the room-card if that is what you mean.