Read the statement by Michael Teeuw here.
MMM-Gas-storage-EU
-
I just programmed my first JavaScript program ever. It is no big thing but it works (thanks to ChatGPT)…
So the module shows a battery icon and the amount of stored gas for a specified EU country (according to country codes such as
DE
,IT
,FR
etc.
The size of the font and battery change according to the amount. The lesser gas, the bigger the icon (as it is more important now).
For now I am still testing if the module updates as wished. Is it enough to adddefaults: { reloadInterval: 1000 * 60 * 60 * 2, // all 2 hours - really should be enough once a day but who knows when this time will be? },
??? or is there more to do?
I will think about my module a bit longer if there are other things to consider.Do you have any specific wished I could implement?
I will publish a beta soon. -
@coernel cool
you can calculate the next time of day u want to refresh… end of day -now + time to refresh
-
@sdetweil as I am really still a noob would you be so friendly to give me the exact line of code? If I do it it will take either a minute if my first guess is right or even half an hour.
The main problem is that I do not know, when Gas Infrastructure Europe updates the values. Are they live? Set at midnight or maybe at six in the morning? I will try to find that out. So for now a 2 hour update interval will be a good compromise.
So defining
reloadInterval
is enough to trigger a reload? -
@coernel said in MMM-Gas-storage-EU:
So defining reloadInterval is enough to trigger a reload?
depends on the coding…
-
@coernel said in MMM-Gas-storage-EU:
The main problem is that I do not know, when Gas Infrastructure Europe updates the values.
should find that out first