#Is there a way to compress a tile card for light entity to show the slider on the same row as info?

1 messages · Page 1 of 1 (latest)

dawn badge
#

Effectively, I'm trying to reproduce the looks of the "Mushroom Card" as seen on the screenshot with label "Retro" - but I want to do it with the native tile card. There are few reasons why "Mushroom Card" is not enough for me:

  1. Mushroom Card only allows showing a single "data point" - e.g. state, whereas with the native tile card I can show (eg for light) brightness, color temperature, and when it was last changed.
  2. I'd like to use "Custom Features for Home Assistant Cards" (https://github.com/Nerwyn/service-call-tile-feature) which allows extending native tile cards with additional features (buttons, sliders etc) which can be used to add extra controls/shortcuts to the entity's card (eg, switch the light to a specific color or effect, enable Adaptive Lightning, navigate to color picker etc) - you can see a breif example on the second screenshot where I extend a tile card for a switch with a "Spinbox" for selecting a threshold for the humidity vent

I'm equally open to tweaking it via card_mod, or using advanced features in the native tile card or Mushroom's Light card if someone knows a way to achieve the above.
Thanks!

GitHub

Home Assistant custom features for tile cards and more. Call any action using buttons, dropdowns, selectors, sliders, and spinboxes. - Nerwyn/service-call-tile-feature

#

Found a similar community thread when someone was trying to do something similar to a Mushroom Light Card https://community.home-assistant.io/t/mushroom-light-card-demo-of-combining-brightness-and-name-areas/602882

dawn badge
#

I'm looking to setup the card to look like this, but so that the brightness slider would appear on the first line together with the info

#

Kinda like this

#

So I either need to figure out to add extra data points to a mushroom card so that I can then use a vertical stack to add some buttons below somehow, or I need to figure out a way to force the brightness slider onto the info row in the native tile card

spiral crescent
#

I was actually playing around with this a few weeks ago and here's what I came up with:

type: tile
entity: light.sunroom_ceiling
features:
  - type: custom:service-call
    entries:
      - type: slider
        entity_id: light.sunroom_ceiling
        range:
          - 0
          - 100
        tap_action:
          action: perform-action
          target:
            entity_id:
              - light.sunroom_ceiling
          perform_action: light.turn_on
          data:
            brightness_pct: "{{ value }}"
        step: 1
        value_attribute: brightness
        styles: ""
    styles: |-
      :host {
        height: 0px;
        position: relative;
        display: block;
        top: -49px;
        left: calc(50% - 12px);
        width: 50%;
      }
grid_options:
  columns: 12
  rows: na
card_mod:
  style: |
    hui-card-features {
      --feature-padding: 0px;
    }

If it wasn't for the features padding/gap this could be done without card mod. The features actually used to not have a flexbox gap and instead used a bottom margin, but that was changed a few versions ago when the HA devs updated tile cards and feature sizing to better work with sections view. I kind of wish they would go back to using the bottom margin instead of the technically more correct flexbox gap, as the gap causes issues with hidden custom feature rows (which is almost uniquely an issue with my project 🙃).

dawn badge
#

oh, this works great - thanks a lot!