Closed gigatexel closed 1 year ago
Do not confirm here:
type: vertical-stack
cards:
- type: custom:mini-graph-card
entities:
- entity: sensor.xiaomi_cg_1_co2
hours_to_show: 4
points_per_hour: 120
line_width: 1
smoothing: false
aggregate_func: last
show:
labels: true
- type: custom:mini-graph-card
entities:
- entity: sensor.xiaomi_cg_1_co2
hours_to_show: 4
points_per_hour: 120
line_width: 1
smoothing: false
aggregate_func: last
lower_bound: ~400
show:
labels: true
- type: custom:mini-graph-card
entities:
- entity: sensor.xiaomi_cg_1_co2
hours_to_show: 4
points_per_hour: 120
line_width: 1
smoothing: false
aggregate_func: last
lower_bound: 0
show:
labels: true
Works fine w/o upper_bound
.
What is a strange value "-11" on your 1st picture ? Post a code for your card.
It is generated by the card.
Since no code is posted, nothing to investigate.
Code:
cards:
- type: custom:mushroom-template-card
card_mod:
style: |
ha-card {
border-width: 0px;
}
primary: Regenwater
icon: mdi:thermometer
icon_color: |-
{% if is_state(entity, 'unknown') %}
{% elif states(entity) | float >= 75 %}
green
{% elif states(entity) | float >= 50 %}
yellow
{% elif states(entity) | float >= 25 %}
amber
{% elif states(entity) | float >= 15 %}
orange
{% else %}
red
{% endif %}
entity: sensor.regenwater_percentage_filter
- type: custom:mini-graph-card
card_mod:
style: |
ha-card {
border-width: 0px;
}
lower_bound: 0
upper_bound: 100
entities:
- sensor.regenwater_percentage_filter
show:
icon: false
name: false
state: true
labels: true
hours_to_show: 48
points_per_hour: 1
color_thresholds:
- value: 0
color: '#FF0000'
- value: 15
color: '#FFA500'
- value: 25
color: '#FFBF00'
- value: 50
color: '#FFFF00'
- value: 75
color: '#00FF00'
animate: true
line_width: 1
min_bound_range: 25
custom:mushroom-template-card
Not related to the issue. May be removed from the posted code.
Remove this & recheck: upper_bound: 100 color_thresholds: min_bound_range: 25
Fixed. min_bound_range seems to overwrite
thx!
Expected behaviour: when a lower_bound is specified, the graph uses this as a "hard" bound
In reality, this only works when an upper_bound is also specified.