Blockly use actual time

Hey there,

i am quite new to OH3 and blockly and want to set a light to “ON” if the lux of a brightness sensor is smaller than 125lx AND it is a time between 4pm and 11pm.

Could you guys give me a hint how i could achieve the time thing?

Cheers, Nic

For the time comparison you need to install the “Date and Time” block library from the add-ons automation menue.

See the in process Blockly tutorial that covers, step-by-step something very similar to your scenario:

Instead of managing these conditions within blockly you can also add it to your rule as rule condition (the “but only if” part)