kalkih / mini-graph-card

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

❔ How to calculate sec to hour for additional info #1043

Closed n3de closed 9 months ago

n3de commented 9 months ago

Hey,

first thank you very much for this great card! It is awesome. I'm unsing it so show the energy from my devices: image

type: custom:mini-graph-card
hours_to_show: 8
points_per_hour: 60
graph: line
animate: true
line_width: 2
line_color: green
hour24: true
show:
  average: true
  extrema: true
entities:
  - entity: sensor.gefrierschrank_leistungswert
  - entity: sensor.gefrierschrank_stromzahler
    show_state: true
    show_graph: false
  - entity: sensor.gefrierschrank_betriebsstunden
    show_state: true
    show_graph: false

As you can see, the "betriebsstunden" (working hours) are in seconds. Is there any option to display this in hour directly in the card?

ildar170975 commented 9 months ago

Is there any option to display this in hour directly in the card?

No. Use a template sensor to convert value in seconds to a value in hours, then use this sensor in the card.