Custom card: Room Card

I’m getting a recursive call when adding anything to the cards section in the createCardElement function, via the try/catch surrounding the setConfig call in the createThing function. It rolls up on the dashboard as a “Maximum call stack exceeded” error-card.

Would I have something wrong in my config, or is the cards section just not supported yet?

Can you share the yaml? Cards are supported in the room card. But let’s check your yaml first

I get the same error if I have the horizontal-stack or not. Maybe it’s the Mushroom cards?

type: custom:room-card
title: Office
icon: mdi:chair-rolling
entity: light.office_light
tap_action:
  action: navigate
  navigation_path: office
info_entities:
  - entity: binary_sensor.office_sensor_motion_detection
    show_icon: true
  - sensor.office_sensor_air_temperature
  - sensor.office_sensor_humidity
cards:
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-light-card
        entity: light.office_light
        show_brightness_control: false
        name: Light
        layout: vertical
        secondary_info: none
      - type: custom:mushroom-fan-card
        entity: fan.office_fan
        name: Fan
        icon_animation: true
        layout: vertical
        secondary_info: none
      - type: custom:mushroom-light-card
        entity: light.island
        layout: vertical
        secondary_info: none

image

Occasionally it works:

image

I never tested it with mushroom cards, but the problem is the horizontal stack I think. But you don’t need to add those cards. Just add the entities to the room card with entities:

Well, I tried it, but it looks like that it can’t handle the different entity part.
My yaml is below, maybe I made something wrong:

  - entity: switch.balazs_nagy
    name: Nagy lámpa
    state_color: yellow
    tap_action:
      action: toggle
    double_tap_action:
      entity: light.balazs_fenyero
      action: more-info

Also it looks like that double tap turns off and on the device before brings the more-info content.

Are you sure there is no way to use hold_action?

O you want to use it like that. Hmm that seems to be a bug in the documentation. Sorry about that. If you check the documentation of the actions, you will see it is not possible to call more-info of another entity. Simply because you can’t pass the entity to the action.

Let me double check it, but I think it won’t work

I go totally wild with this great card and define every single room.
I only have the next question:
Can I also show an entity’s seconday_info in the info_entities section?
In my case his last-changed value.

1 Like

You should be able to configure that by passing the attribute: last-changed

@marcokreeft87 thanks for the new update.

Could you please give an example for each.

  1. How to use “conditional styles to the icons”
  2. How to use “Conditonal icon base on other entity”

Thanks

Have you read the documentation?

got it thanks…

1 Like

Can I change the font size inside a Room card? I would like to give the numbers that show up as the temp and humidity sensor about a 2x size increase.

Try the

styles:
   font-size: 30px

for example. But I would not recommend changing the font size, it might shift the layout

This is the info entity for instance I would like to change the font size on. It doesn’t seem to do anything, is this the proper code:

info_entities:

  • entity: sensor.lumi_lumi_weather_mantel_temperature
    name: Temperature
    show_icon: false
    icon: mdi:thermometer
    styles:
    font-size: 30px

@marcokreeft87 plz guide how to decrease the space between elements both text and icons ?

Kindly guide.

I see the example on the github page is no longer there… where’d it go? :slight_smile:
Thank you!

Its in the wiki: Configuration · marcokreeft87/room-card Wiki · GitHub

I mean, you can say its working haha

try the styles…

I only found one parameter that is working

styles:
width: 10px

How to shift the text also ?