I’m trying to implement the corona sensor.
I want to set the max for the bar cards to the biggest number instead of a static number.
But I can’t seem to use a template to set the max for the graph to work:
cards:
- card:
max: '{{ states(''sensor.worldwide_coronavirus_confirmed'') | int }}'
min: 0
padding: 2px
title_position: inside
type: 'custom:bar-card'
width: 100%
filter:
include:
- entity_id: '*worldwide_coronavirus*'
type: 'custom:auto-entities'
- card:
max: '{{ states(''sensor.denmark_coronavirus_confirmed'') | int }}'
min: 0
padding: 2px
title_position: inside
type: 'custom:bar-card'
width: 100%
filter:
include:
- entity_id: '*denmark_coronavirus*'
type: 'custom:auto-entities'
type: vertical-stack
This gave this result: