mini-graph-card icon indicating copy to clipboard operation
mini-graph-card copied to clipboard

Fill based on another entity?

Open fodi666 opened this issue 7 months ago • 6 comments

Hi, is it possible to specify that a line should be filled on parts when another entity has a certain value? I have my heating system's data hooked up with this card and I wold like to show when the heating is active. Currently I have a temperature entity which I display and I have a heating active binary entity that I'd like to use to control the fill (fill only when true, similar to the default display of a climate entity). Thanks

fodi666 avatar Nov 29 '23 08:11 fodi666

Not possible currently. You may prepare a DETAILED description of a desired functionality and propose a "Feature request".

Or find another ways.

ildar170975 avatar Nov 29 '23 20:11 ildar170975

how much detail do you need?

fodi666 avatar Nov 29 '23 20:11 fodi666

How much do YOU need to write a working code? Principles of making a good technical assignment is an off-topic here. It should be a complete description for a person who will be able to implement this.

ildar170975 avatar Nov 29 '23 20:11 ildar170975

That'd be great to have the same conditional fill under the temperature line as HA's default graph behavior with the thermostat image This one is quite ugly but I liked the idea

Maybe we could give the ability to configure a conditional fill property into the entity line like this:

type: custom:mini-graph-card
entities:
  - entity: climate.heater
    attribute: current_temperature
  - entity: climate.heater
    attribute: temperature
    fill:
      type: entity
      entity: climate.heater
      color_mapping:
        heat: red
        cool: blue

Glideh avatar Nov 30 '23 09:11 Glideh

That'd be great to have the same conditional fill under the temperature line as HA's default graph behavior with the thermostat image This one is quite ugly but I liked the idea

Maybe we could give the ability to configure a conditional fill property into the entity line like this:

type: custom:mini-graph-card
entities:
  - entity: climate.heater
    attribute: current_temperature
  - entity: climate.heater
    attribute: temperature
    fill:
      type: entity
      entity: climate.heater
      color_mapping:
        heat: red
        cool: blue

I could also imagine this as having a temperature sensor as the entity for the line and a binary sensor for the fill

type: custom:mini-graph-card
entities:
  - entity: sensor.temperature
    fill:
      type: entity
      entity: binary_sensor.heating

fodi666 avatar Nov 30 '23 09:11 fodi666

Yes, would be considered as binary when no color mapping specified. That would still be great to be able to specify the color though.

Glideh avatar Nov 30 '23 10:11 Glideh