Nic0205
(Nic0205)
March 27, 2022, 3:04pm
1
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
Rolli
(Roland Mayr)
March 27, 2022, 3:39pm
2
For the time comparison you need to install the “Date and Time” block library from the add-ons automation menue.
JustinG
(JustinG)
March 27, 2022, 4:32pm
3
See the in process Blockly tutorial that covers, step-by-step something very similar to your scenario:
This has now been merged into the main docs (should be available sometime in the next day or so after the next build). Thanks for all comments and edits! I’m closing this thread now. Please see Rules - Blockly | openHAB for the latest version. If you have questions open a new thread. If you have comments or suggestions please click the link at the bottom of the page to open an issue/PR./
I’m returning to the Getting Started Tutorial. This is a first draft before I submit it to the official docs…
Matze0211
(Matthias)
March 27, 2022, 8:01pm
4
Instead of managing these conditions within blockly you can also add it to your rule as rule condition (the “but only if” part)