-
Innlegg
2 -
Ble med
-
Besøkte siden sist
Innholdstype
Profiler
Forum
Blogger
Nedlastninger
Artikler
Regler
Hendelser
Galleri
Store
Innlegg skrevet av Olegs
-
-
Hi guys,
Thanks for awesome sensor Olav!
Can offset work in different direction? In Latvia I have +1 hour of CEST time right now, so I need to -1 hour of current value.
Nordpool spot integrasjon i Home-assistant
i Home Assistant
Skrevet
Thanks, it works very well for what I need.
One note: currently file contains two instances of code - old one and new one in development branch - is this planned? https://bitbucket.org/OlavAndre/nordpool/src/c3244670b1e8a0a8d863754741c323c13ca4f8f6/nordpool.py?at=development&fileviewer=file-view-default - search for "utf-8", you'll see both starts. Is this supposed to be so? I deleted second part for me.
Also, I have set offset to be '01:00:00', and changed lines with timedelta to such:
now = datetime.datetime.now() + datetime.timedelta(hours=-1*self._offset)
Now I am getting proper time for Latvia. Thing that I am not sure of - what will happen at midnight when my date has already changed, but CEST has not.