Trying to mimic the default Home Assistant climate card #264
Replies: 6 comments 9 replies
-
The issue here is that the traces with the hvac_action attribute don't have a unit_of_measurement, so they are actually in a different yaxis. I suggest you change your filter to: filters:
- map_y: >-
state.attributes.hvac_action === "heating" ?
state.attributes.current_temperature : null And finally, plotly doesn't have a mode to fill downwards without it affecting autoscaling (unfortunately). To simulate that you could:
|
Beta Was this translation helpful? Give feedback.
-
@dbuezas Using In my research I found this which sounds more or less what I may need but I have not figured out how to use it yet: https://plotly.com/javascript/reference/#layout-yaxis-matches If I can find a way to override the scale for y2 (the cooling/heating) to match y1 then it should work. The only way I know to do it is statically setting a range which would force me to do the same for y1 (temp and setpoint). The
|
Beta Was this translation helpful? Give feedback.
-
I made some modifications and added the current outdoor temperature, and added a range selector to choose a different history period.
Here is the card... |
Beta Was this translation helpful? Give feedback.
-
how can I draw that chart, when I have 2 different entities? |
Beta Was this translation helpful? Give feedback.
-
@laszlojakab what is the '...' mean in min function? |
Beta Was this translation helpful? Give feedback.
-
This is the card I am trying to mimic:
I got close but either the cooling/heating shaded area doesn't match the y1 range (top of shaded area should overlay perfectly with the temperature line) or it does forcing the y1 range to begin from 0 instead of autoscaling but then it looks terrible as seen in image below...
I tried many different things but the other "close point" is shown below. In this attempt the scale for the shaded area is obviously incorrect as I had to set the range to something static (0-50) that would hide the bottom line set at -1 (when heating/cooling is off, it is set to -1) but unfortunately this causes the top to never match the temperature line.
Here I simply removed the y2 range to show the bottom line I want to hide and the fact that the top still doesn't match the temperature line.
Code below is like the one above except I removed the y2 axis range (0-50) to show the y2 scaling issue in the screenshot above.
Summary: How do I make heating/cooling overlay properly Temperature (top should match) while keeping the y1 scale as tight as possible to fit temperature and setpoint? In other words, y2 range should be forced to match y1 range (filltozero forces it to start from zero if I let it autoscale... I essentially need to overcome that). Hopefully all this makes sense...
Beta Was this translation helpful? Give feedback.
All reactions