pacemaker82 / PredBat-Table-Card

A custom Predbat table card that allows flexible column management and styling
7 stars 1 forks source link

Missing the first row of the predbat plan #36

Closed gcoan closed 1 week ago

gcoan commented 1 week ago

Its 00:50 and the predbat table card has omitted the first line of the predbat plan.

Never seen it done anything like this before !

Latest table card, 1.5.5.2 Predbat v8.0.0

Predbat plan: image

Table card: image

predbat_plan HTML: image

copy/pasted:

html:

Plan starts: 2024-07-06 00:55 last updated: 00:55:00 version: v8.0.0
TimeImport p (w/loss)Export p (w/loss)StateLimit %PV kWh (10%)Load kWh (10%)SOC %CostTotal
Sat 00:5516.54 (18.23) 15.00 (13.68) 0.05 (0.07)62↘£0.00
Sat 01:0017.72 (19.53) 15.00 (13.68) Dis↘ ⅎ 360.45 (0.52)62↘-32 p ↘£0.00
Sat 01:3018.22 (20.08) 15.00 (13.68) Dis↘ 40.5 (0.54)41↘-31 p ↘-£0.32
Sat 02:0014.99 (16.52) 15.00 (13.68) 0.53 (0.58)20↘-19 p ↘-£0.64
Sat 02:3013.23 (14.58) 15.00 (13.68) 1.05 (1.22)6↘+11 p ↗-£0.83
Sat 03:008.57 (9.45) 15.00 (13.68) Chrg↗ 1001.44 (1.58)4↗+33 p ↗-£0.72
Sat 03:308.40 (9.26) 15.00 (13.68) 0.77 (0.83)21↗+26 p ↗-£0.38
Sat 04:007.94 (8.75) 15.00 (13.68) 0.82 (0.89)37↗+25 p ↗-£0.11
Sat 04:307.48 (8.25) 15.00 (13.68) 0.59 (0.63)53↗+22 p ↗£0.14
Sat 05:009.04 (9.96) 15.00 (13.68) 0.05 (0.03)0.27 (0.27)68↗+24 p ↗£0.37
Sat 05:308.82 (9.72) 15.00 (13.68) 0.17 (0.1)☀0.12 (0.13)85↗+17 p ↗£0.61
Sat 06:0012.95 (14.27) 15.00 (13.68) 0.35 (0.16)☀0.25 (0.28)98↗+1 p ↗£0.78
Sat 06:3014.86 (16.38) 15.00 (13.68) → ⅎ 0.65 (0.21)☀0.19 (0.22)100→-6 p ↘£0.80
Sat 07:0014.97 (16.50) 15.00 (13.68) → ⅎ 0.98 (0.28)☀0.18 (0.19)100→-11 p ↘£0.74
Sat 07:3015.72 (17.33) 15.00 (13.68) → ⅎ 1.37 (0.39)☀0.22 (0.25)100→-16 p ↘£0.62
Sat 08:0017.44 (19.22) 15.00 (13.68) 1.77 (0.52)☀0.24 (0.26)100→-21 p ↘£0.46
Sat 08:3017.20 (18.96) 15.00 (13.68) 2.13 (0.65)☀0.21 (0.23)100→-27 p ↘£0.24
Sat 09:0016.32 (17.99) 15.00 (13.68) 2.46 (0.79)☀0.28 (0.3)100→-31 p ↘-£0.04
Sat 09:3013.12 (14.46) 15.00 (13.68) HoldChrg→ 1002.81 (0.94)☀0.42 (0.5)100→-34 p ↘-£0.35
Sat 10:0010.36 (11.42) 15.00 (13.68) 3.13 (1.09)☀0.37 (0.37)100→-39 p ↘-£0.69
Sat 10:308.38 (9.24) 15.00 (13.68) HoldChrg→ 1003.4 (1.26)☀0.83 (0.95)100→-36 p ↘-£1.09
Sat 11:004.65 (5.13) 15.00 (13.68) 3.63 (1.38)☀0.33 (0.35)100→-47 p ↘-£1.45
Sat 11:304.11 (4.53) 15.00 (13.68) 3.79 (1.47)☀0.33 (0.37)100→-49 p ↘-£1.93
Sat 12:000.02 (0.02) 15.00 (13.68) HoldChrg→ 1003.88 (1.51)☀1.29 (1.49)100→-36 p ↘-£2.42
Sat 12:30-0.22 (-0.24) 15.00 (13.68) 3.91 (1.5)☀1.0 (1.05)100→-41 p ↘-£2.79
Sat 13:00-1.34 (-1.48) 15.00 (13.68) 3.83 (1.41)☀0.67 (0.76)100→-44 p ↘-£3.20
Sat 13:30-2.21 (-2.44) 15.00 (13.68) 3.64 (1.24)☀0.66 (0.7)100→-42 p ↘-£3.65
Sat 14:00-3.83 (-4.22) 15.00 (13.68) 3.45 (1.06)☀0.39 (0.41)100→-43 p ↘-£4.08
Sat 14:30-3.97 (-4.38) 15.00 (13.68) HoldChrg→ 1003.23 (0.88)☀0.37 (0.42)100→-40 p ↘-£4.52
Sat 15:00-3.07 (-3.38) 15.00 (13.68) 3.03 (0.77)☀0.4 (0.42)100→-37 p ↘-£4.92
Sat 15:30-2.21 (-2.44) 15.00 (13.68) 2.86 (0.72)☀0.26 (0.28)100→-37 p ↘-£5.30
Sat 16:008.98 (9.90) 15.00 (13.68) HoldChrg→ 1002.63 (0.62)☀0.47 (0.53)100→-30 p ↘-£5.67
Sat 16:3013.17 (14.52) 15.00 (13.68) 2.34 (0.5)☀0.39 (0.44)100→-27 p ↘-£5.98
Sat 17:0012.24 (13.49) 15.00 (13.68) 2.1 (0.44)☀0.52 (0.57)100→-22 p ↘-£6.26
Sat 17:3015.86 (17.48) 15.00 (13.68) 2.01 (0.45)☀0.9 (1.0)100→-15 p ↘-£6.49
Sat 18:0018.32 (20.19) 15.00 (13.68) 1.86 (0.43)☀0.44 (0.45)100→-20 p ↘-£6.64
Sat 18:3020.49 (22.59) 15.00 (13.68) 1.65 (0.41)☀0.29 (0.31)100→-19 p ↘-£6.84
Sat 19:0013.27 (14.63) 15.00 (13.68) HoldChrg→ 1001.44 (0.36)☀0.61 (0.69)100→-11 p ↘-£7.04
Sat 19:3014.33 (15.80) 15.00 (13.68) 1.13 (0.26)☀0.33 (0.37)100→-11 p ↘-£7.15
Sat 20:0016.12 (17.77) 15.00 (13.68) 0.79 (0.17)☀0.48 (0.51)100→-4 p ↘-£7.27
Sat 20:3015.44 (17.02) 15.00 (13.68) 0.39 (0.08)☀0.33 (0.36)100→-0 p ↘-£7.31
Sat 21:0016.50 (18.19) 15.00 (13.68) Chrg↗ 1000.02 (0.01)0.28 (0.32)100→+4 p ↗-£7.32
Sat 21:3016.72 (18.43) 15.00 (13.68) 0.43 (0.48)100→+7 p ↗-£7.27
Sat 22:0016.74 (18.45) 15.00 (13.68) 0.38 (0.41)100↘-£7.20
Sat 22:3015.10 (16.64) 15.00 (13.68) 0.47 (0.53)97↘-£7.20
Sat 23:0015.10 ? (16.64) 15.00 (13.68) 0.44 (0.48)93↘-£7.20
Sat 23:3015.10 ? (16.64) 15.00 (13.68) 0.45 (0.47)90↘-£7.20
Sun 00:0016.54 ? (18.23) 15.00 (13.68) 0.52 (0.61)86↘-£7.20
Sun 00:3016.54 ? (18.23) 15.00 (13.68) 0.71 (0.77)82↘-£7.20
Sun 01:0017.72 ? (19.53) 15.00 (13.68) 0.58 (0.65)76↘-£7.20
Sun 01:3018.22 ? (20.08) 15.00 (13.68) 0.57 (0.62)72↘-£7.20
Sun 02:0014.99 ? (16.52) 15.00 (13.68) Chrg↗ 1000.6 (0.65)67↗+12 p ↗-£7.20
Sun 02:3013.23 ? (14.58) 15.00 (13.68) 1.14 (1.31)68↗+18 p ↗-£7.07
friendly_name: Plan in HTML icon: mdi:web-box

gcoan commented 1 week ago

Further update: just rolled past 1am and now the first row of the table card displayed is 1:30 🤷‍♂️

image

gcoan commented 1 week ago

Further update:

This appears to be related to Predbat v8.0.0

First thing this morning same thing, first row missing from the table card.

Upgraded to latest predbat 8.2.4, table card now correctly displays first row

downgraded to 8.0.0, first row disappears

So maybe something obscure in the HTML (copied above) for this predbat version, probably low priority if the fix is to upgrade to newer Predbat. I was only running an old version because that was what I had in my fork and I was testing fixes to some Predbat bugs I'd made

pacemaker82 commented 1 week ago

yeah its because in 8.1.x trefor added a new row of metadata at the top of the table. The quick fix was for me to skip that, but the downside is anyone pre 8.1.x will have the first row ignored in the table.

I need to do an "if" on the predbat version to support both scenarios, or detect some other way. Probably latter is better option in case trefor adds more rows of metadata before the actual table data. I make assumptions at the moment on "row number x" means something.

pacemaker82 commented 1 week ago

Should be fixed in latest version 1.5.5.3. Its not a fancy fix but it at least will guarentee my code looks at the table of data and not his metadata. Ideally his metadata wouldnt be part of the table HTML as its not part of the table data, but alas.

gcoan commented 1 week ago

Should be fixed in latest version 1.5.5.3. Its not a fancy fix but it at least will guarentee my code looks at the table of data and not his metadata. Ideally his metadata wouldnt be part of the table HTML as its not part of the table data, but alas.

1.5.5.3 works fine on both 8.0.0 and 8.2.4, thanks

Proper meta data structure is on my to-do list, but working through some other things first....