piitaya / lovelace-mushroom

Build a beautiful Home Assistant dashboard easily
Apache License 2.0
3.54k stars 330 forks source link

[Feature]: Allow custom secondary_info #1447

Open ceinmart opened 3 months ago

ceinmart commented 3 months ago

Requirements

Is your feature request related to a problem?

Trying to custom my mushroom-entity card , to show the time left on the timer of my switch.

Describe the solution you'd like

Something like:

type: custom:mushroom-entity-card
entity: switch.toalheiro
name: Toalheiro
tap_action:
  action: none
double_tap_action:
  action: call-service
  service: script.toalheiro_2h
  target: {}
icon_color: red
fill_container: false
primary_info: name
secondary_info: {{states("number.toalheiro_timer")}}

Describe alternatives you've considered

found nothing until now...

Additional context

Better dashboard customization and optimization where I can put the necessary info grouped.

sgofferj commented 2 months ago

Another use case would be to show the current power consumption of a device. Power consumption usually is a separate entity. The card would then use the switch.xyz entity for coloring the icon and action but the secondary info would be the sensor.xyz_power

Johanneke commented 2 weeks ago

Can't you just use the mushroom-template-card for that?

ceinmart commented 2 weeks ago

Can't you just use the mushroom-template-card for that?

Yes! I just learn about it now and works perfect! It's much more powerful and more visual resources...

Thank you!