lovelace-slider-entity-row icon indicating copy to clipboard operation
lovelace-slider-entity-row copied to clipboard

Full_row but with icon

Open enryf89 opened this issue 4 years ago • 13 comments

Hello everyone, I'd like to have the possibility to have a full-width slider like when using the full_row: true option, but with the possibility to set an icon on the left.

Right now the only alternative I have found is using the options full_row: false name: ' ' but this leaves a gap between the icon and the slider.

thanks guys and keep up the good work. Enrico

enryf89 avatar Jul 01 '20 07:07 enryf89

You can try the zero-width joiner: Go to here and press the copy button.

KTibow avatar Jul 15 '20 18:07 KTibow

Visual Example

I think that @enryf89 had something similar to this in mind. (Cobbled it together with paint.net :D).

type: entities
show_header_toggle: false
entities:
  - type: 'custom:slider-entity-row'
    attribute: brightness
    entity: light.rgbw_bed_light
    toggle: true
  - type: 'custom:slider-entity-row'
    attribute: white_value
    entity: light.rgbw_bed_light
    full_icon: 'mdi:white-balance-sunny' # idea for how to add icon to config
    full_row: true
    hide_state: false

Slider 1 is brightness, Slider 2 is white_value.

image

david-kalbermatten avatar Jul 18 '20 11:07 david-kalbermatten

Yes, exactly, @david-kalbermatten got it 100% right.

I'd like to have only the icon and the large slider.

thanks

enryf89 avatar Jul 20 '20 10:07 enryf89

You can try the zero-width joiner: Go to here and press the copy button.

Thank you @KTibow for the suggestion, I tried that, but I have the empty space between the icon and the slider like this:

Screenshot 2020-07-20 at 12 59 38

I'd prefer it like @david-kalbermatten mockup.

enryf89 avatar Jul 20 '20 11:07 enryf89

@enryf89 Would you mind sharing the code for the color presets? Looks interesting :D

david-kalbermatten avatar Jul 20 '20 11:07 david-kalbermatten

here it is (only the colored buttons part):

entities:
  - colors:
      - color_name: white
        icon_color: 'linear-gradient(15deg,azure,white)'
        transition: 5
      - color_name: tomato
        icon_color: 'linear-gradient(15deg,red,tomato)'
        transition: 5
      - color_name: orange
        icon_color: 'linear-gradient(15deg,coral,orange)'
        transition: 5
      - color_name: gold
        icon_color: 'linear-gradient(15deg,gold,yellow)'
        transition: 5
      - color_name: green
        icon_color: 'linear-gradient(15deg,limegreen,yellowgreen)'
        transition: 5
      - color_name: royalblue
        icon_color: 'linear-gradient(15deg,mediumblue,royalblue)'
        transition: 5
      - color_name: darkmagenta
        icon_color: 'linear-gradient(15deg,darkmagenta,darkorchid)'
        transition: 5
    entity: light.led_salotto
    justify: around
    type: 'custom:rgb-light-card'

enryf89 avatar Jul 20 '20 11:07 enryf89

I would also love this suggested feature. In my case, I'm trying to use this as an element on a picture elements card and the text is unnecessary. Just an icon and a slider side by side is all I need.

ktownsend-personal avatar Aug 02 '20 04:08 ktownsend-personal

:+1: I would like that too

VictorLamoine avatar Aug 26 '20 09:08 VictorLamoine

Hit the :+1: button if you like it instead of leaving a comment.

KTibow avatar Aug 26 '20 13:08 KTibow

I also want to show icon but no name.

This control should support hide_name: true or show_name: false

apivaral avatar Jun 28 '21 04:06 apivaral

I also want to show icon but no name.

This control should support hide_name: true or show_name: false

name: " "

thomasloven avatar Jun 28 '21 08:06 thomasloven

I also want to show icon but no name. This control should support hide_name: true or show_name: false

name: " "

It’s not the same, that leaves a large white space :(

apivaral avatar Jun 28 '21 08:06 apivaral

I managed to achieve this with the help of card_mod:

  head:
    entity: light.office_lights
    type: custom:slider-entity-row
    full_row: false
    hide_state: true
    style:
      hui-generic-entity-row$: |
        div.info.pointer.text-content {
          display: none;
        }
      hui-generic-entity-row: |
        div>ha-slider:not(.full) {
           max-width: none;
         }

image

Would still be nice to have it as part of the component and not having to rely on CSS to do this :)

oscarb avatar Feb 20 '22 23:02 oscarb