wernerhp / ha.integration.load_shedding

A Home Assistant integration to track your load schedding schedule.
MIT License
118 stars 21 forks source link

Stage Times no longer matching #69

Closed kelos-01 closed 1 year ago

kelos-01 commented 1 year ago

Seems this is recent, but the integration does not report the same data any longer compared to the ESP app. Below you'll see that the integration is saying there's 30min of load shedding starting at 16:00 - 16:30 [14:00 + 2gmt] (on the 29th)

The app does not show anything of the same rather indicating a later time of the same stage. (the area is correct as load shedding does take place as per the ESP app at the specified time)

image IMG_8261

kimfr commented 1 year ago

I've got the same issue - it seems to happened when there is a change in the state during the 2,5 / 4,5 hour slot. My understanding is that the EskomSePush is "solving" this is the App itself - hence the API still have the split. Not sure how to resolve that in Home Assistant.

What I have done is set "Min. event duration (mins)" in the configure option for the integration to 31 Min. - maybe not the best solution but at least it got rid of those 30 min. loadshedding slots - only option I could find for now.

kelos-01 commented 1 year ago

@kimfr great, I've also now updated the Min event duration to exclude. Thank very much for the tip.

rengro46 commented 1 year ago

The time is read as GMT/UTC, hence it looks like it is 2 hours off. Use this template if you want to set up an automation that normalises the time:

{% if state_attr('sensor.load_shedding_area_jhbcitypower2_X_abcdefghij','next_start_time') != none %} {% set start = state_attr('sensor.load_shedding_area_jhbcitypower2_X_abcdefghij','next_start_time')|as_datetime|as_local %} {{ start - now() < timedelta(minutes=3) }} {% endif %}

This is NOT my template, i found it on the internet, and i use it as a template automation to switch off my geyser smart switch 3 mins before load shedding is scheduled to start.

Look at the " |as datetime|as local" items, which converts it to your local time from UTC, depending on what you have set your timezone in HA