Hi I have a sensor that outputs time in hh:mm:ss, but I am unable to show it this way in the card, is it possible?
Unclear what you want to achieve.
The “mini-graph-card” builds a graph based on an entity containing either a numerical state or a numerical attribute.
States of an entity (as well as attributes) are stored in a database; each record has some timestamp.
The card takes a set of data “value of a state(or attribute) + timestamp” and builds a graph: Y axis for a value, X axis for a timestamp.
Do you really wish to use values “hh:mm:ss” for a Y axis?
this is my entity and its output
this my mini-graph yaml
type: custom:mini-graph-card
entities:
- entity: sensor.minutos_hh_mm_ss
name: "Dolly: horas trabajadas diariamente"
show_state: true
show:
graph: bar
fill: true
labels: true
color_thresholds:
- value: 0
color: "#e2ffd6"
- value: 15
color: "#7affc7"
- value: 45
color: "#2dffc5"
- value: 60
color: "#00ffd4"
- value: 75
color: "#5ae1ff"
- value: 89
color: "#1dd7ff"
- value: 100
color: "#00aeff"
points: true
hours_to_show: 96
points_per_hour: 10
update_interval: 60
bar_spacing: 2
animate: true
line_color: "#c21120"
group_by: date
hour24: true
align_header: center
align_icon: left
align_state: left
color: red
and this is the card itself
what I want is the card to show 2:04:48
Go to Dev tools → State. Select this entity, make a screenshot and post here. What I am interested to know is if this entity has a “duration” device class.
The best you can do is building a graph for a value in minutes - and a displayed state will be shown as “123.456”, i.e. in minutes, not in “hh:mm:ss” format.
hi, Ilĺ come back with that screenshot, but let me advance that in minutes was primarily but I polished the thing to get human readable data, so hh:mm:ss is exactly what I want, and by the way I remember creating a sensor template, and it only worked when I deleted the class duration, until then it was always unavailable
The “hh:mm:ss” look on a card can be achieved in 2 ways:
- Your sensor is in minutes (float) or a timestamp (float), a desired look is done by a card itself: some cards (like a temlplate-entity-row) allow to customize a value presentation by using templates - i.e. you process a value to get a desired “hh:mm:ss” look.
- Your sensor has “duration” device_class - and at least stock cards are obliged to show a readable “hh:mm:ss” (in fact, they are not in some cases - find corr. issues on Github).
And anyway mini-graph-card will not show “hh:mm:ss”.