Closed Woodstockskipper closed 1 month ago
That's odd.
Maybe try adding all semicolons, just in case there's any ambiguous statement:
type: custom:plotly-graph
entities:
- entity: sensor.si_6_0_battery_voltage_a
filters:
- resample: 0.5h
internal: true
fn: |
$fn({ xs, ys, vars }) => {
vars.y_axis = ys;
vars.xs = xs;
}
- entity: sensor.si_6_0_battery_soc_total
filters:
- resample: 0.5h
internal: true
fn: |
$fn({ xs, ys, vars }) => {
vars.x_axis = ys;
const clr = [];
for (let i = 1; i < xs.length; i++) {
if (i < xs.length - 1) {
clr[i] = "blue";
} else {
clr[i] = "crimson";
}
}
vars.clr = clr;
}
- entity: ''
name: Ladezustände
x: $fn({ vars }) => vars.x_axis
y: $fn({ vars }) => vars.y_axis
type: scatter
mode: markers
marker:
size: 5
color: $fn({ vars }) => vars.clr
- entity: ''
name: Nom. Entladekurve
x:
- 10
- 20
- 30
- 80
- 95
- 98
- 100.01
y:
- 46.6
- 49.6
- 50.1
- 51.7
- 52.2
- 53
- 55
mode: lines
line:
color: darkslateblue
shape: spline
hours_to_show: 750
raw_plotly_config: true
ha_theme: true
layout:
margin:
t: 10
l: 60
r: 10
b: 70
height: 500
yaxis:
title:
text: Batteriespannung [V]
xaxis:
title:
text: SOC [%]
autorange: true
legend:
orientation: h
bgcolor: transparent
x: 0
y: 1
yanchor: bottom
Thank you for cleaning up the code (I'm not so experienced). But even after cleaning up the code, the behaviour with IOS remains. The strange thing is, that this code ran for some weeks on all devices. May it be, that there is a limitation for the shown dots in IOS? The number of dots in the graph are already increasing every day, up to about 1500 (750h with 2 dots per hour) I tried already to reduce the number of dots, but this didn't change the behaviour. Stephan
Could be. Does changing hours to show to 24 makes it work on iOS?
Yes! In my tests I went down to 100. The diagram shall show the long term discharging curve for a Battery, there I would need about two month of data. In the browser it works. That should be ok for analysis. But strange with the IOS...-
Hi, now after 6 weeks of problems with the iOS, it now works again without problem. May be, that an update of the iOS solved it. Thank you for your support! We can close the issue now.
Describe the bug Hi, since some days I get the following error (see screenshot) on the IOS App on all devices. Android App and Browser work fine:
Screenshots This is the error respond: (IOS) This it should look like: (browser)
yaml
Additional context I had a long search to find this powerful tool and I´m verry excited. It would be nice if someone could help me to make it work again.