Hi
Is there any way to customize the graphics or timelines that appear when I tap the entities in lovelace?
They always show last 24 hours. I’d like to select for example:1 hour for entities with many changes in a day or 1 week for entities with few changes.
I tried to change dates in global history, but it doesn’t make any effect in lovelace entities
Thanks
tom_l
August 7, 2020, 2:09pm
2
The easiest way to do this is to replace the more-info card with your own using browser-mod: GitHub - thomasloven/hass-browser_mod: 🔹 A Home Assistant integration to turn your browser into a controllable entity and media player
You could replace the more info pop-up card with this Lovelace card that lets you choose the time to display for example:
Hey everyone,
Here’s a way to dynamically select the number of hours a history graph shows.
This project relies 100% on the config-template-card , so all credits go to the developer.
First, we create an input_select entity.
input_select:
hours_to_show:
name: Hours to show
options:
- 24
- 12
- 4
- 2
- 48
- 72
initial: 24
Then the code for creating our card is the following:
type: vertical-stack
cards:
- type: entities
entities:
…
Quick and accurate reply!
Now you’ve given me a lot of work to do
Thanks, I’ll try it
For the first approach I didn’t need config-template-card. The results are more than satisfactory:
popup_cards:
binary_sensor.esp01_53_internet:
title: Internet
card:
type: vertical-stack
cards:
- entities:
- entity: binary_sensor.esp01_53_internet
name: Estado actual
secondary_info: last-changed
- entity: sensor.internet_off_ratio
name: '% Desconectado últimos 10min'
- entity: sensor.internet_off_count
name: Cortes ultimos 10min
title: Estado
type: entities
- entities:
- entity: binary_sensor.esp01_53_internet
hours_to_show: 24
title: Estado ultimas 24h
type: history-graph
- entities:
- entity: binary_sensor.esp01_53_internet
hours_to_show: 1
title: Estado ultima hora
type: history-graph
Thanks again
1 Like