Custom Button Setup for Tracking Kids with Sensors

Hey everyone, I recently set up a custom button in my home automation system to track whether my kids are home or not. It’s been a fun project, and I wanted to share my experience in case others are looking to do something similar!

The idea is pretty simple: I have three kids, each with their own device tracker. I wanted a visual way to see who’s home at a glance. I decided to use a sensor that changes its state based on their locations. For example, if only Child A is home, the sensor shows ‘a-home’, and if both A and B are home, it shows ‘ab-home’.

I stumbled upon this while trying to figure out how to integrate multiple device trackers into a single visual element. After some research, I realized I could create a custom sensor using automation rules. Here’s how I did it:

  1. Sensor Setup: I created a sensor that monitors the device trackers for each child. If a child’s tracker shows they’re home, the sensor updates its state accordingly.
  2. Custom Button: I designed a custom button card in Lovelace that displays different images based on the sensor’s state. For example, if the sensor shows ‘a-home’, it displays an image of Child A.
  3. Automation: I set up automations to update the sensor whenever the kids’ locations change. This ensures the button always reflects the current status.

The best part? It’s super customizable! You can add more kids, change the images, or even expand it to track other family members. I’m really happy with how it turned out, and it’s been a great way to keep track of everyone’s comings and goings.

If anyone has questions or wants to share their own setup, feel free to reach out! I’d love to hear how others are using custom buttons and sensors in their homes.