Solar Forecast PV

Don’t worry, DateTime is a very sensitive topic => DateTime Conversion (openHAB 3.x)

Let me try to break it down

tomorrowDateTime = time.ZonedDateTime.now().plusDays(1); // tomorrow as js-joda
tomorrowDate = time.convert(tomorrowDateTime).toDate(); // convert to javascript date
forecastTomorrow = solareForecastActions.getDay(tomorrowDate);
  • time. is referring to js-joda library like described in javascript binding
  • tomorrowDateTime is exactly one day ahead as joda object
  • tomorrowDate is the conversion from js-joda to javascript date
  • use this tomorrowDate to query forecast for next day
1 Like