The Idea
Home Assistant can periodically ping a reliable external address (such as 8.8.8.8 or your ISP’s gateway). If the ping fails, your internet is likely down. When responses resume, your connection is back.
From there, you can:
- Change a smart light’s color when the internet goes down
- Send a notification to your phone when the connection is restored
Step 1: Set Up the Ping Integration
The Ping integration creates a binary sensor that reports whether a host is reachable. Configure it to ping a stable address outside your network.
You’ll end up with a sensor like:
binary_sensor.internet_connection
When it’s on, your internet is up. When it’s off, it’s down.
Step 2: Change a Light When the Internet Goes Down
Create an automation that watches the ping sensor. When the connection drops:
- Turn on a selected smart light
- Change its color to red (or any warning color you prefer)
This gives you instant, glanceable feedback—just look at the light to know what’s going on.
Step 3: Get Notified When You’re Back Online
Instead of constantly checking if the internet is back, let Home Assistant do the work. Create another automation that triggers when the ping sensor switches back to on.
When that happens:
- Send a push notification to your phone using the Home Assistant mobile app
- Optionally change the light back to green or turn it off
Why This Is Useful
- No guessing whether the outage is local or ISP-related
- Instant visual feedback for everyone in the house
- No more refreshing apps waiting for service to return
It’s a small automation, but it solves a real everyday annoyance—and that’s what smart homes are all about.