Page 1 of 1

Generating a heartbeat

Posted: 01 Feb 2021 14:43
by ridewithstyle
Hi there,

for kicks I was trying to generate a heartbeat as a periodic trigger for other actions. Since I didn't find a post about a clever way, I wanted to share what I came up with in the end in case somebody else might need something simliar.

I used the CodeDevice with a binary sensor that should only be active every 15 minutes.

Code: Select all

new Date().getMinutes() % 15 == 0 ? 'on' : 'off'
2021-02-01 12_35_56-Window.png
2021-02-01 12_35_56-Window.png (52.22 KiB) Viewed 1623 times
Most likely there are easier ways, but this was a quick solution someone might find helpful

regards,
rws