thomasloven / lovelace-template-entity-row

🔹 Display whatever you want in an entities card row.
MIT License
210 stars 16 forks source link

number slider not visible #89

Closed ChristophCaina closed 4 months ago

ChristophCaina commented 1 year ago

Hi, I've decided to use the template-entity-row to change the color of the icon from a number-slider. The Entity I am referring to is a cover / shutter - and I am using the default entities card from HomeAssistant - which does only provide the slider in the "more info" section.

Therefore, I've created a number template, which does call the service to change the position...

Now, when I add the template, the slider disappears.

type: entities
entities:
  - entity: cover.schalter_rolladen_wohnzimmer_ost
    secondary_info: position
    name: Rolladen Wohnzimmer (Ost)
  - type: custom:template-entity-row
    entity: number.rolladen_wohnzimmer_ost_set_position
    name: Position setzen
    active: '{{ is_state(''cover.schalter_rolladen_wohnzimmer_ost'', ''open'') }}'
    icon: mdi:window-shutter-settings
state_color: true

Card with enabled template: grafik The color changing is working as expected, but the slider disappeared.

Card with disabled template: grafik

Card with enabled template and without template for the same number silider: grafik

ildar170975 commented 1 year ago

The template-entity-row does not support a slider. Initially, it is not a good idea to use the template-entity-row for changing an icon's color - use card-mod instead, it is designed for styling.

ChristophCaina commented 1 year ago

Hi :) Thanks! My workaround so far is now, to use the "slider-entity-row" here - and set it to full_row: true.

grafik

Unfortunately, the slider-row-entity itself does not work for "number" entities... I could replace my own slider for the cover, since the slider-entity-row does support covers, but on another area where I would like to recreate this design it is not working atm.

I will check the options of Card-Mod, as suggested.