megakid / ha_octopus_intelligent

Apache License 2.0
86 stars 10 forks source link

Intelligent Octopus Slot not on when charging Outside regular hours #36

Closed sirshorty closed 4 months ago

sirshorty commented 4 months ago

Octopus shows that my charging window is 11pm to 11am tonight. However it didn't switch to On until 11.30pm, and tells me that the 'Octopus Intelligent Offpeak End' is in 6 hours, at 5.30am.

I'm using the Intelligent Slot On to trigger charging house batteries, so right now my battery stops charging at 5.30am but my car continues charging and draining my battery before I'm even awake. Before I upgraded to the latest version last week (I was fairly out of date) it was working perfectly.

Right now it only seems to operate between 11.30pm and 5.30am.

davebarrett1959 commented 4 months ago

Take a look at https://github.com/megakid/ha_octopus_intelligent/issues/35#issuecomment-1949942197. Although about the planned dispatch slots I found the same fix worked for the Intelligent slot On entity as well

megakid commented 4 months ago

I'll try to fix this soon, thanks for the suggested fix - my HA is broken (hardware failure) at the moment so unable to see these issues first hand

pdcastro commented 4 months ago

Assuming that this issue was the same as #35, whose cause was that the source attribute was occasionally None in the planned dispatches object of API responses, then it should be fixed with PR #37 in release v1.7.0 (already available through HACS custom repositories). There are some corner-case limitations to be aware of.