I have read, that now.gethour > xx might not be working in OH3. However, I am still looking for an alternative.
until OH 2 I had:
if ((now.getHourofDay >= 7 )) && (now.isAfter(new DateTime(Min_Rolladen_Open_Zeit.state.toString) ))) {
now I tried: if ((now.isAfter(ZonedDateTime.now().with(LocalTime.MIDNIGHT).plusHours(7))) && (now.isAfter(new DateTime(Min_Rolladen_Open_Zeit.state.toString) ))) {
The error is still: Script execution of rule with UID 'sonne-9' failed: An error occurred during the script execution: null in sonne
First, there are missing brackets in the first place.
Second, the OH2 method is .getHourOfDay and every letter is case sensitive. Though you sure did use the correct spelling, it’s crucial use it also here.
Third, I’m pretty sure you can easily use ZonedDateTime.now.getHour() instead. For complete documentation, see ZonedDateTime (Java Platform SE 8 )