stevegal / solis_control

solis control pyscript for home assistant
MIT License
27 stars 1 forks source link

Time zone adjustment #20

Open usbrit opened 5 months ago

usbrit commented 5 months ago

Hi, Thanks to everyone's help here I've now got running automations controlling the inverter. Thank you all.

However, I'm getting a time sent t the inverter that is 1 hr after that provided by Bottlecapdave OctopusEnergy Target time.

I assume (as I'm running my HA system on GMT London, this a GMT vs BST issue.

Is there away to adjust this in the soils_control.py? (maybe in time 33?: 'date = now.strftime("%a, %d %b %Y %H:%M:%S GMT")`

Thanks, Usbrit

aymsley commented 5 months ago

That time is used in the api protocol, not the chargetimes setting so that’s not the problem.

Have you checked the time on the inverter? Mine was running in GMT, DST was not enabled. There are two places to set it (confusingly). Having done this I now see DST ON in the app.

On Thu, 18 Apr 2024 at 21:56, usbrit @.***> wrote:

Hi, Thanks to everyone's help here I've now got running automations controlling the inverter. Thank you all.

However, I'm getting a time sent t the inverter that is 1 hr after that provided by Bottlecapdave OctopusEnergy Target time.

I assume (as I'm running my HA system on GMT London, this a GMT vs BST issue.

Is there away to adjust this in the soils_control.py? (maybe in time 33?: 'date = now.strftime("%a, %d %b %Y %H:%M:%S GMT")`

Thanks, Usbrit

— Reply to this email directly, view it on GitHub https://github.com/stevegal/solis_control/issues/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFMFL5GG3WCBATGXENSST2TY6AXOBAVCNFSM6AAAAABGOAK3JGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TCNJUGU3TMOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

usbrit commented 5 months ago

Checked that, but appears to be a HA issue, not inverter. Here's what the Target entity is outputting: image

Start Time = 01.30

Here's the Trace from what HA is sending to the API: image Start Time = 02.30

Therefore, must be a HA issue?

aymsley commented 5 months ago

I had to convert the time from the Octopus integration. You will see the time is +00 ie it's UTC time. You need to convert it if your inverter is following DST

Take a look at this. It was asked and answered.

https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues/818

aymsley commented 4 months ago

Update: BottlecapDave did make a change and fix it.

All attributes should now be displayed in local time in v11.0.0. The majority of issues reported in this ticket were due to confusion in how the data was reported rather than it being wrong, so closing this ticket. If you still have an issue, please open a new ticket