Heatpump data with multiple axes and end value #17
Replies: 18 comments 12 replies
-
Wow! |
Beta Was this translation helpful? Give feedback.
-
I think your use case is a really good one and you made use of all features! 🎉 I'm not that happy with how repetitive the yaml gets, I may consider adding some extra configs at some point to auto generate this kinds of configs. It is such a pitty that yaml anchors get expanded when one saves the configs in lovelace. If you have ideas on how the configuration may look like, let me know! I was thinking in something like: defaults:
entities:
entity:
trace: ...#default for all traces
last_value_text:
show: true
texttemplate: ...
layout:
yaxes: ...#default for all y axes
|
Beta Was this translation helpful? Give feedback.
-
btw, did you find a better way to have enough right margin in the x-axis for the text? |
Beta Was this translation helpful? Give feedback.
-
It would have been great with common settings. 😃 To adjust the right margin I tried to force
(When the time is 16:00) So I chose 14 hours in range even though I have 12 hours on the hours_to_show:. But I never managed to get the time on range to change automatically. |
Beta Was this translation helpful? Give feedback.
-
Oh, you gave me an Idea! (ys, xs)=> ({ x: [xs[xs.length-1] + 1000*60*60*2], y: ys.slice(-1) }) Then color: transparent. I'll think about this for a while. I calculate the range internally and could add an option for this in the future, but until then, this should do it :) |
Beta Was this translation helpful? Give feedback.
-
Btw, I currently use the right axis for all entities with a different unit_of_measurement than the first one, I could change it to this swimlane style. Then this would happen automatically. And an extra option for the number value at the end. I'll think about this. |
Beta Was this translation helpful? Give feedback.
-
Just released the new version! you can remove all your helper traces and just add: defaults:
entity:
show_value: true and if you'd like to try new colors, use color_scheme: 3 # or any number between 0 and 24 |
Beta Was this translation helpful? Give feedback.
-
You can now also do defaults:
yaxis:
gridcolor: whitesmoke
zeroline: false
fixedrange: true and remove all your individual yaxis1,2,3,45,6,7 fixes |
Beta Was this translation helpful? Give feedback.
-
Very nice 😄 Much cleaner configuration It is noticeable that on mobile_app everything flows much better now. Some errors I found. On the new "defaults:" I prefer bold text on "show value" The left field that was previously "unit". I still do not manage to get the lambda from above to work to create space to the right.
|
Beta Was this translation helpful? Give feedback.
-
Here is with lambda and a texttemplate. 😄
|
Beta Was this translation helpful? Give feedback.
-
With the lambda entity |
Beta Was this translation helpful? Give feedback.
-
I released a new version that should fix the problems you described. For now I marked it as beta. show_value:
right_margin: 10 # in percentage of width More here: https://github.com/dbuezas/lovelace-plotly-graph-card#extra-entity-attributes |
Beta Was this translation helpful? Give feedback.
-
Right_margin and Texttample works perfekt 😃 😃 But still some problem with
|
Beta Was this translation helpful? Give feedback.
-
Another question. 😄 |
Beta Was this translation helpful? Give feedback.
-
@markuska00 please try v1.1.2 type: custom:plotly-graph
entities:
- entity: sensor.nibe_36061_40004
yaxis: y1
- entity: sensor.nibe_36061_43005
yaxis: y2
- entity: sensor.nibe_36061_43009
yaxis: y3
- entity: sensor.nibe_36061_40008
yaxis: y3
- entity: sensor.nibe_36061_43123
yaxis: y4
- entity: sensor.nibe_36061_43136
yaxis: y4
- entity: sensor.varmepump_pris_kw
yaxis: y5
- entity: sensor.pris_varmepump_snitt_dygn
yaxis: y5
- entity: sensor.nibe_36061_43084
yaxis: y5
- entity: sensor.nibe_36061_10069
yaxis: y6
- entity: sensor.nordpool_dygnspris_el
yaxis: y6
no_default_layout: true
defaults:
entity:
texttemplate: <b> %{y}</b> %{customdata.unit_of_measurement}
show_value:
right_margin: 10
line:
width: 1.5
yaxes:
fixedrange: true
gridcolor: black
zeroline: false
layout:
plot_bgcolor: white
dragmode: pan
margin:
t: 30
l: 55
r: 30
b: 50
pad: 5
showlegend: false
height: 650
yaxis:
gridcolor: whitesmoke
title:
text: Utetemp
yaxis2:
title:
text: Gradminuter
yaxis3:
title:
text: Framledning
range:
- 24
- 40
yaxis4:
title:
text: Kompressor
yaxis5:
title:
text: kr/timma
yaxis6:
title:
text: Elpris
grid:
ygap: 0.07
rows: 6
columns: 1
pattern: coupled
roworder: top to bottom
xaxis:
gridcolor: whitesmoke
rangeselector:
'y': 1.01
buttons:
- count: 1
step: hour
- count: 6
step: hour
- count: 12
step: hour
- count: 1
step: day
hours_to_show: 12
refresh_interval: 20 |
Beta Was this translation helpful? Give feedback.
-
Thank you very much 😄 I found one small bug The range on the first yaxis get wrong
But if I move the "show_value: right_margin: 10" the range is correct
|
Beta Was this translation helpful? Give feedback.
-
One small amateur hack to avoid text collisions on "show_value" 😄 Maybe something for the future?
|
Beta Was this translation helpful? Give feedback.
-
In V3.0.0, these yaxis defaults are required: defaults:
yaxes:
side: left
overlaying: 'y'
visible: true |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to start with thanking for a fantastic custom graph card!! 😃 👍
I like the multiple axes function which is amazing when going forward and backward in time.
And being able to show the current value at the end of the line is perfect for me.
Beta Was this translation helpful? Give feedback.
All reactions