You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Beside there are negative values, the negative temperature values are not shown in histogramm2dcontour.
Screenshots
yaml
type: custom:plotly-graphentities:
- entity: sensor.at_yesterdaystatistic: meanperiod: daytime_offset: '-1d'internal: truefilters:
- filter: i>0fn: $fn ({ ys, vars }) => vars.temperature = ys
- entity: sensor.gas_verbrauch_kwhstatistic: stateperiod: dayname: Gasinternal: truefilters:
- filter: i>0
- derivate: dfn: $fn ({ ys, vars }) => vars.gas = ys
- entity: ''x: $fn ({ vars }) => vars.temperature'y': $fn ({ vars }) => vars.gasmode: markersname: pointsmarker:
color: rgb(102,0,0)size: 3opacity: 0.4type: scatter
- entity: ''line:
shape: linearcolor: bluefilters:
- fn: | ({ys, xs, vars}) => { return {xs: vars.temperature, ys: vars.gas}; }
- trendline
- entity: ''filters:
- fn: | ({vars}) => { const xs = vars.temperature; const ys = vars.gas; const pairs = xs.map((x, i) => [x,ys[i]]) .filter( ([x,y]) => Number.isFinite(x) && Number.isFinite(y)) // unavailables in the x axis break trendlines .sort((a,b)=>a[0]-b[0]); // the trendline filter expects the x axis to be sorted const r = { xs: pairs.map(([x,y])=>x), ys: pairs.map(([x,y])=>y), }; console.log(r); return r; }
- trendline
- store_var: trend x: >- $fn ({ vars }) => vars.trend.xs.map(x=>+x) // the trendline made dates out of the x axis 'y': >- $fn ({ vars }) => vars.trend.ys // and since this is a raw_plotly_config, we need to set x and y ourselves
- entity: ''x: $fn ({ vars }) => vars.temperature'y': $fn ({ vars }) => vars.gasname: densityncontours: 40colorscale: YlGnBunbinsx: 15nbinsy: 15reversescale: trueshowscale: falseline:
color: lightgraytype: histogram2dcontour
- entity: ''x: $fn ({ vars }) => vars.temperaturename: x densitytexttemplate: '%{x:0.1f}'marker:
color: "rgb(40\t57\t143\t)"yaxis: y2opacity: 1type: histogram
- entity: ''x: undefined'y': $fn ({ vars }) => vars.gasname: y densitytexttemplate: '%{y:0.1f}'marker:
color: "rgb(40\t57\t143\t)"xaxis: x2type: histogramhours_to_show: 4800title: >- $fn({getFromConfig})=>`Heating - Last ${getFromConfig('hours_to_show')/24} days`raw_plotly_config: truelayout:
margin:
t: 20l: 70r: 20b: 70height: 400bargap: 0.1showlegend: falsexaxis:
title:
text: Outside Temperature (°C)autorange: truedomain:
- 0
- 0.85showgrid: falsezeroline: falseyaxis:
title:
text: Gas burned (kWh per day)domain:
- 0
- 0.85showgrid: falsezeroline: falsexaxis2:
domain:
- 0.85
- 1showgrid: falsezeroline: falseyaxis2:
domain:
- 0.85
- 1showgrid: falsezeroline: false
Additional context
With following config, we see the negative values for temperature. On another mashine this is working, asi posted here #216.
May there is something wrong with my config above.
Describe the bug
Beside there are negative values, the negative temperature values are not shown in histogramm2dcontour.
Screenshots
yaml
Additional context
With following config, we see the negative values for temperature. On another mashine this is working, asi posted here #216.
May there is something wrong with my config above.
THX 4 help!
The text was updated successfully, but these errors were encountered: