kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.87k stars 231 forks source link

Ignore "Entity not available" #1032

Closed monsieurhannes closed 5 months ago

monsieurhannes commented 7 months ago

Hi,

I have an ESPHome-device that is from time to time offline. It shows the temperature, but it's either out of range or just picky. However, I display it with all the other sensors in the house on the main page, but when this (or any other) sensor goes offline for more than 24h, the whole graph disappears with the following error: image

Is there anything I can do to ignore missing entities?

type: custom:mini-graph-card
decimals: 1
entities:
  - entity: sensor.lumi_lumi_weather_temperature
    name: Living Room
    color: violet
  - entity: sensor.lumi_lumi_airmonitor_acn01_temperature
    name: Bedroom
    color: '#FBB829'
  - entity: sensor.lumi_lumi_weather_temperature_2
    name: Emma's Room
    color: lightgreen
  - entity: sensor.temp_sensor_01_temp_sensor_01_temp
    name: Attic
    color: '#B7121F'
  - entity: sensor.lumi_lumi_weather_temperature_4
    name: Bathroom
  - entity: sensor.altherma_outside_temperature
    name: Heat pump outdoor
    color: '#1B3D81'
  - entity: sensor.bt_bridge_01_temp_sensor_03_temp
    name: Kitchen
    color: orange
  - entity: sensor.temp_sensor_02_temp_sensor_02_temp
    name: Garden
    color: green
name: Temperature 24h
hour24: true
hours_to_show: 24
line_width: 0.5
points: false
points_per_hour: 1
show:
  fill: fade
  icon_adaptive_color: false
animate: true
ildar170975 commented 7 months ago

The sensor is not unavailable. It just disappears. You have to create a template sensor for it. The card cannot just ignore non-existing entities.

monsieurhannes commented 7 months ago

You have to create a template sensor for it.

Through the "Helpers" menu? That issue is not a singular issue with just one entity... so I don't think that works in the long run. Is there a way to use templates directly in the mini-graph-card?

ildar170975 commented 5 months ago
  1. Templates cannot be used instead of entities.
  2. Explanations provided, closing.

P.S. there is a FR for adding a kind of value_template to define templates: https://github.com/kalkih/mini-graph-card/issues/892