kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.89k stars 233 forks source link

Is using templates in the hours_to_show option possible? #952

Closed Aaroneisele55 closed 1 year ago

Aaroneisele55 commented 1 year ago

I want to make a graph with adjustable historic time ( using an input_number helper), but that makes the graph disappear, even tough when I set the same value in the YAML code, it works. I'm using the following code:

type: custom:mini-graph-card
hour24: true
animate: true
hours_to_show: |
  {{states("input_number.graph_stunden")|int}}
entities:
  - entity: sensor.anteil_co2_neutraler_strom
  - entity: sensor.anteil_solarstrom

Where the template works when used in the dev tools template section, and the graph card works when I put in a 2 instead of the Template

How should I do it instead?

Thanks Aaron

ildar170975 commented 1 year ago

https://github.com/kalkih/mini-graph-card/issues/697#issuecomment-1014930071

ildar170975 commented 1 year ago

Duplicates https://github.com/kalkih/mini-graph-card/issues/697