Sensor for a running / not running automation

Hi there.
In case you are interested I shared my configuration here: Presence simulator (random turn on/off lights during the night)

Gekomax