Tutorial: Virtual Night Sensor
Something simple yet practical: a virtual night sensor that is automatically changing state at sunrise/sunset time.
I created a virtual sensor, that I update with two rules, one that is triggered at sunset and another one at sunrise.
Each rule is calling the HTTP request to change state to 1 and 0 respectively.
In order to be able to trigger the rule at sunset/sunrise, you need to
- add a virtual weather station.
- once this is done, the when trigger can be based on astro schedule that are the sunset/sunrise time respectively.
This is very practical, it enables you to create rules based on night/day. Until then, all I could do was either have a static time (8AM-8PM).