Generating a heartbeat
Posted: 01 Feb 2021 14:43
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.
Most likely there are easier ways, but this was a quick solution someone might find helpful
regards,
rws
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'
regards,
rws