I want to compute the total power consumption values since the beginning of the month. I have the persistance set up (InfluxDB) but I cannot get the from-date computed correctly:
val beginningOfMonth = now.withTimeAtStartOfDay.minusDays(now.dayOfMonth()) var Number sumWatt = gWatt_Huset.sumSince(beginningOfMonth)
This code does not work since now.dayOfMonth() returns a Property, and not an integer.
Any ideas on how I can get this to work?