thomasloven / lovelace-state-switch

🔹Dynamically replace lovelace cards depending on occasion
MIT License
382 stars 27 forks source link

State-Switch with Mushroom Cards - Doesnt render the full size #111

Open adirburke opened 9 months ago

adirburke commented 9 months ago

Hi

As you can see in the image below, the state-swtich (Garage) doesnt render the full size when used with a template mushroom card

Screenshot 2023-09-15 at 9 51 38 am

Code :

type: custom:state-switch
entity: user
states:
  Adir:
    type: custom:mushroom-template-card
    primary: Garage
    secondary: '{{ states[''sensor.state_of_garage_door''].state }}'
    icon: mdi:garage
    entity: switch.garage_control
    icon_color: |-
      {% if is_state('sensor.state_of_garage_door', 'Open') %}
      amber
      {% endif %}
    layout: vertical
    tap_action:
      action: navigate
      navigation_path: /lovelace/garage
    double_tap_action:
      action: toggle
    fill_container: true
surfingbytes commented 9 months ago

Just run into the same issue. It looks like state_switch card messes "fill_container: true" settings.

sr01 commented 4 months ago

try wrapping a state with a grid, and set the grid square to true.