arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.04k stars 4.78k forks source link

Switch a light but only at night #3653

Closed Kaimane closed 6 years ago

Kaimane commented 6 years ago

I connected the HC-SR501 to GPIO14 and the light is switched on (and off) if the sensor detected a movement. Is there any solution to do that only at night? I thought about adding a TSL2561 but I found no possible way to bring the two sensors into dependence. Next idea was using the variables %sunrise% and %sunset% ... If sunrise is true disable switching the light. If sunset is true enable switching the light. But how to set this rules? Would it be possible?

Jason2866 commented 6 years ago

Take a look in wiki https://github.com/arendst/Sonoff-Tasmota/wiki/Rules#examples

ascillato commented 6 years ago

Hi,

If you feel that your question has been answered, please remember to close this issue. Thanks