ldotlopez / ha-ideenergy

ideenergy integration for home-assistant
GNU General Public License v3.0
74 stars 13 forks source link

how does TimeWindowBarrier work #65

Closed TomW1605 closed 8 months ago

TomW1605 commented 8 months ago

Hi, this isnt really an issue. im writing a similar (almost identical) component for getting data from my local power company that also has a 24-48 hour delay on the data. so i forked this repo and got almost everything working (but not at all pretty yet). the issue i have is that my power company updates the power at midnight (there is only historical data). i was hoping i could use the TimeWindowBarrier you have already written to have it only update between midnight and 1am. but looking at it i dont think that is what it does.

so my question, what does TimeWindowBarrier do? and assuming it dosnt do what i want, any advice on making another barrier that does?

TomW1605 commented 8 months ago

nvm, looking at it more i think i have worked it out. TimeWindowBarrier does almost what i want but for minutes not hours but that should be dead easy to change. thanks for making this and the historical sensor stuff. it made my life so much easier

ldotlopez commented 8 months ago

Hi,

I'm glad that you can use this integration (and historical-sensors) for your project. Please, keep me up to date about it to include it in the list of projects using historical-sensors.

Currently there is a bug about database corruption if your are using a datacoordinator and you enable a second (or third a one…) sensor while running homeassistant, I'm still figuring WTF is going on… Just be aware on this.

Please, ask any questions or ideas about historical sensors.

TomW1605 commented 8 months ago

will do, here is the repo although i havnt uploaded any of my changes yet https://github.com/TomW1605/ha-synergy

for the corruption issue, i have had that happen to me a few times (glad its easy to recover), i may have some useful info should i put it here or is there already an issue tracking it?

ldotlopez commented 8 months ago

i may have some useful info should i put it here or is there already an issue tracking it?

Any information will be very useful, the issue: https://github.com/ldotlopez/ha-ideenergy/issues/58

TomW1605 commented 8 months ago

if your interested, i have now pushed my code to the repo i linked. sorry for butchering your code so much.