The Development Tricks thread

I’d just thought it would be nice to see what tricks other people use to make working with HA easier.

Here’s one which I’ve found immensely useful, and even better when using Google Assistant/Alexa to trigger it for you with IFTTT

Restart Home Assistant with IFTTT

First create a webhook automation that will restart Home Assistant:

- alias: Restart Home Assistant
    platform: webhook
    webhook_id: !secret restart_token
    - service: homeassistant.restart

Don’t forget to add restart_token to your secrets.yaml file. You can generate a 32 hex string using this online tool or from a linux prompt:

hexdump -n 16 -e ‘4/4 “%08X” 1 “\n”’ /dev/random

In IFTTT, you will create a new applet using your This event of choice. I used Google Assistant so that when I say “Hey Google, restart Home Assistant” it will then call the That event, which is a web-hook. Paste the following string (replace your domain name and web hook string) in the URL field:<generated hex string>

Set the method to PUSH. Change content type to text/plain and save.

1 Like

I like this, nice tip!