kalkih/mini-graph-card

Fill based on another entity?

fodi666 opened this issue · 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

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

Or find another ways.

how much detail do you need?

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.

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

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

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