Reverse the order of the values. Have 100 first, then work your way down 35. Like this:
line_color_below:
- value: 100
color: green
- value: 45
color: orange
- value: 35
color: red
Reverse the order of the values. Have 100 first, then work your way down 35. Like this:
line_color_below:
- value: 100
color: green
- value: 45
color: orange
- value: 35
color: red
Not right now, but great idea, could see it being useful.
I went ahead and added a color option to the entity object, setting this will override all other color options.
entities:
- entity: sensor.one
- entity: sensor.two
color: teal
line_color: red # sensor.two will override this
line_color_below: # sensor.two will override this
- value: 35
color: red
Will be available in the next release, probably tonight.
Thatâs correct, added a sort function now, so this wonât be necessary in the future
Manual y-axis bounds, improved color thresholds & more.
In order to make this card compatible with the new âUnused entities UIâ I had to make some changes to the way entities are set in the config. You know have to use the entities
option and list entities in a list (even if itâs only one entity), similar to how the core entities
card works.
The examples have been updated to reflect these changes.
New: Option color_thresholds
(#45)
New: Color thresholds now changes dynamically with the history (#45)
New: Options lower_bound
& upper_bound
added (#40)
New: Option color
to entity object, overrides other color options
Change: entities
option now always requires a list, changed in order to be compatible with âUnused entitiesâ UI (#44) (BREAKING CHANGE)
Change: Default value for points_per_hour
changed from 1
to 0.5
.
Fixed: Updated lit-element to v2.0.1
Fixed: Zero values show up as current value when hovered over (#41)
Fixed: Added additional checks for empty history
Removed: entity
option, which was previously deprecated since v0.2.0, use entities
option (#44) (BREAKING CHANGE).
Removed: line_color_above
and line_color_below
, see new color_thresholds
option (#45) (BREAKING CHANGE)
Iâm sorry if I missed something, but how does it know if the threshold is above or below?
âThe threshold at where the color should apply if state is above/below.â
It should be above, forgot to update the docs when merging line_color_above
& line_color_below
into a single option.
Hi Kalkih,
Not sure you might be able to help, I am facing an issue with the combination of swiper-card and your mini-graph-card.
I posted on the swiper-card page, but it might aswell be the mini-graph-card issue, so would you mind check this?
Thanks
Anddrea
PS, the threshold look very nice in the docs screenshot, I was thinking about suggesting it to you a few days back
Hey, what do you mean by the âbig versionâ of the output? Have the card take up the complete width?
I canât get the new version to work.
when i comment out show: the graph shows.
Not sure what to useâŠ
color_thresholds list optional v0.2.3 Set thresholds for dynamic graph colors, see Line color object.
Or thisâŠ
- type: custom:mini-graph-card
entities:
- sensor.temperature_sitting
name: Temp
#location_icon: left
#location_state: center
show:
graph: true
fill: true
extrema: true
line_color_threshold:
- value: 10
color: "#f39c12"
- value: 20
color: "#d35400"
- value: 21.5
color: "#c0392b"
- type: custom:mini-graph-card
entities:
- sensor.temperature_sitting
name: Temp
#location_icon: left
#location_state: center
#show:
# graph: true
# fill: true
# extrema: true
line_color_threshold:
- value: 10
color: "#f39c12"
- value: 20
color: "#d35400"
- value: 21.5
color: "#c0392b"
Should be color_thresholds
, I just suck at updating the docs
Not sure why you donât see the graph at all though, are you sure the cache cleared properly?
Yes done the usual cache clearing.
Try changing to color_thresholds
and see if that solves the issue.
OK Done that its not showing. It shows only if i comment out the show: stuff.
And the dynamic line color is not working.
That makes me think the old version might still be loading from cache, please check the browser developer console for potential error messages.
Same here, same behaviourâŠ
Iâll try to recreate, please comment out extrema meanwhile.
This is with
- type: custom:mini-graph-card
entities:
- sensor.temperature_sitting
name: Temp
#location_icon: left
#location_state: center
show:
graph: true
fill: true
extrema: true
color_thresholds:
- value: 10
color: "#f39c12"
- value: 20
color: "#d35400"
- value: 21.5
color: "#c0392b"
Hope this helps.
Fix in place, Iâll make a new release, coming in a few mins, Iâll report when itâs available.
Sorry.
Okay, letâs try again⊠a few quick fixes and a new style option for the graph fill.
New: Parameter fade
for show
-> fill
option, makes the fill fade out
Fixed: History entries with null
state breaking graph (#46)
Fixed: Compatibility issues with the custom swiper-card
Fixed: Broken extrema
That was very fastâŠ
You are the Man
All works thank you very much.