This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Outside compensation curve
#10
You always fetch a full day, that is why my sample is using yesterday until 4 days back, so 3 full days..

From the knowledge base (time values are ignored) :
Code:
1
dates - Lua table with two items - start and end, each item must contain year, month, day keys, time values (hours, minutes and seconds) are ignored

You can get today via:

Code:
123456789
require('trends') local today = {} today['start'] = os.date('*t', os.time()) today['end'] = os.date('*t', os.time() + 86400) -- Fetch the average temperature for the timespan local todayaverage = trends.fetchone('Temperatuur Woonkamer', today) log(todayaverage)
 
To see the full data used just change  -> trends.fetchone into  -> trends.fetch, here you will see all samples of today
Reply


Messages In This Thread
Outside compensation curve - by oyvindnordbo - 04.12.2018, 07:13
RE: Outside compensation curve - by admin - 04.12.2018, 07:29
RE: Outside compensation curve - by admin - 04.12.2018, 09:20
RE: Outside compensation curve - by Daniel - 04.12.2018, 09:22
RE: Outside compensation curve - by merel - 04.12.2018, 13:45
RE: Outside compensation curve - by Erwin van der Zwart - 17.01.2025, 08:09
RE: Outside compensation curve - by admin - 17.01.2025, 08:18

Forum Jump: