Custom card: Room Card

Hello @marcokreeft87!
After the latest update it seems I can’t use the card to navigate to other views.
The weird part is that after the update it affected only my laptop, while phone and tablet remained OK, until this next morning.

All above screams that the error might be between the chair and the screen, but I hoped to see if you or others notice similar issues in the pursuit of the culprit

Can you share your yaml? Maybe the last update changed some action behavior

Can do.
Heres the card for my bathroom. They’re linking to the new subview, but I get the same issue with default pages, and the no-go full path.

type: custom:room-card
title: Bad
tap_action:
  action: navigate
  navigation_path: /lovelace-subviews/bad
entities:
  - entity: light.bathrom2_roof_spot
    name: Taklampe
    hide_if:
      entity: sensor.light_unavailable
      state: true
    tap_action:
      action: toggle
  - entity: media_player.bathroom2
    name: Media
    show_icon: true
    icon:
      conditions:
        - condition: equals
          value: playing
          styles:
            color: orange
        - condition: equals
          value: idle
          styles:
            color: orange
        - condition: equals
          value: 'off'
          styles:
            color: default
    show_states:
      - playing
      - paused
    tap_action:
      action: toggle
  - entity: sensor.varmtvannstank_availablemix40vol
    name: Vann
    show_icon: true
    icon:
      conditions:
        - icon: mdi:hexagon-outline
          condition: above
          value: 1
          styles:
            color: red
        - icon: mdi:hexagon-slice-1
          condition: above
          value: 80
          styles:
            color: red
        - icon: mdi:hexagon-slice-2
          condition: above
          value: 140
          styles:
            color: orange
        - icon: mdi:hexagon-slice-3
          condition: above
          value: 200
          styles:
            color: orange
        - icon: mdi:hexagon-slice-4
          condition: above
          value: 260
          styles:
            color: green
        - icon: mdi:hexagon-slice-5
          condition: above
          value: 320
          styles:
            color: green
        - icon: mdi:hexagon-slice-6
          condition: above
          value: 350
          styles:
            color: green
  - entity: sensor.vtr300_modus_status
    name: Ventilasjon
    show_icon: true
    icon:
      conditions:
        - condition: equals
          value: Auto schedule - Low
          icon: mdi:fan-auto
          styles:
            color: orange
        - condition: equals
          value: Auto schedule - Normal
          icon: mdi:fan-auto
          styles:
            color: orange
        - condition: equals
          value: Auto schedule - Høy
          icon: mdi:fan-auto
          styles:
            color: orange
        - condition: equals
          value: Manuell Lav
          icon: mdi:fan-speed-1
          styles:
            color: orange
        - condition: equals
          value: Manuell Normal
          icon: mdi:fan-speed-2
          styles:
            color: orange
        - condition: equals
          value: Manuell Høy
          icon: mdi:fan-speed-3
          styles:
            color: orange
        - condition: equals
          value: Party
          icon: mdi:fan-chevron-up
          styles:
            color: orange
        - condition: equals
          value: Boost
          icon: mdi:fan-plus
          styles:
            color: orange
        - condition: equals
          value: borte
          icon: mdi:fan-minus
          styles:
            color: orange
        - condition: equals
          value: ferie
          icon: mdi:fan-remove
          styles:
            color: orange
        - condition: equals
          value: Manuell Stopp
          icon: mdi:fan-off
          styles:
            color: red
info_entities:
  - entity: binary_sensor.bathroom2_occupancy
    show_icon: true
    icon:
      conditions:
        - condition: equals
          value: 'on'
          styles:
            color: orange
        - condition: equals
          value: 'off'
          styles:
            color: default
  - entity: sensor.bathroom2_temperature
    show_icon: false
  - entity: sensor.bathroom2_humidity
    show_icon: false

Tbf I dont know whats causing this. Normal navigation works fine. Subviews seem to work correct on my setup.
The issue that it was only working on your laptop could be because it was cached on phone and tablet.
But I used the HA boilerplate card for action handling, so it should work as designed…

Can you try it with a new subview?

Oh wait, can you try it with an entity configured?

So likes this:

type: custom:room-card
title: Bad
entity: light.somelight
tap_action:
  action: navigate
  navigation_path: /lovelace-subviews/bad
entities:

It might be because for the title to be clickable, the action handler needs an entity

Indeed, the title entity is the problem. I removed them from the cards as it didn’t go well with my layout.
Is this now enforced from the newest version, or was I just good friends with a bug that let me disable it?

My follow up question is then if this is something that can be optional in future releases?

And I want to say that this is one of my favorite cards mixed with subviews, it really helped me improve the design grounded in WAF. (Although she never listened when I said she could click on the card to control lights in detail from the subview…)

I

It wasnt a bug, it was a feature haha. No you managed to shape a bug to your liking :stuck_out_tongue:

I will try to figure out a way to get that functionality back. Can you make a bug on : Issues · marcokreeft87/room-card · GitHub

And thanks for the love !

2 Likes

Should be fixed in latest version

I’m trying to trigger a scene from an entity button. It doesn’t give any errors, but it doesn’t seem to work. Has anyone else tried this?

type: custom:room-card
title: Master Bedroom
entities:
  - entity: scene.morning
    name: chill
    tap_action:
      action: turn_on

Turn_on isn’t a valid action . Take a look at the wiki : Configuration · marcokreeft87/room-card Wiki · GitHub

Thanks! This works:

  - entity: scene.morning
    name: chill
    tap_action:
      action: call-service
      service: scene.turn_on
      target:
        entity_id: scene.morning
1 Like

Hi,

I don’t know what happened, but somehow haptic feedback torned on, and I’m not able to it off, even is I use haptic: none under the action.
Could you please help what should I do?

I use Samsung Note9 and Samsung Note8 with different android versions.

Thank you!
Regards

Yes that’s because of the fix for unwanted toggling.

Okay. Is there a way to disable it? I mean the haptic feedback?

I think you can disable it in the app itself. Cant find a way so quick to disable it through the yaml

How do I change the font size of parts of this card? I’ve tried things in the styles functionality, I’ve tried things in card-mod, nothing seems to affect it. I’ve tried a global change in size, I’ve tried targeting elements within sub-cards. I’m completely at a loss.

I’d also like to know if it’s possible to change the icon size.

Can you share your yaml? I’ll have a crack at it

  - type: custom:room-card
    title: Controls
    entities:
      - entity: light.diy_charge_on_off
        name: DIY
        styles:
          color: green
          font-size: 14px
        state_color: true
        show_icon: true
        icon: mdi:battery-plus
        tap_action:
          action: toggle

I hope that’s what you’re talking about. Where I have the styles, it correctly changes the text color, however using a px value on font-size does nothing. Using an em value instead, like 2.5em, changes the height of the element the name is in, but still doesn’t change the actual text size.

Also, I need to report a bug. If nesting multiple room-cards, with state_color: true, the color doesn’t update immediately on toggling a switch that has custom icons; it requires a page refresh. It works just fine if the room-card is put into a vertical-stack or the custom stack-in-card.

Oh, and another thing. Is it possible to use multiple entity states in icon templates?

Edit: nevermind, I figured it out.

1 Like