How to Create a Smart Welcome Home Automation in Home Assistant

Disclosure: This post contains affiliate links. As an Amazon Associate, I earn from qualifying purchases at no additional cost to you. See our Affiliate Disclosure for details.

One of the most powerful features of Home Assistant is its ability to create intelligent presence detection automations. In this tutorial, I’ll show you how to build a smart “Welcome Home” automation that triggers when you arrive, adjusting lights, climate, and more based on your preferences.

What You’ll Need

Before we begin, make sure you have:

  • Home Assistant installed and running (see our Getting Started guide)
  • Home Assistant Companion app installed on your phone
  • Smart devices to control (lights, thermostats, switches, etc.)

Recommended Devices

For this automation, I recommend these Home Assistant-compatible devices:

Step 1: Set Up Device Tracking

First, ensure your mobile device is being tracked by Home Assistant. The Companion app creates a device_tracker entity automatically when installed.

To verify, go to Developer Tools → States and search for device_tracker.your_phone_name. The state should show either home or not_home.

Step 2: Create the Automation

Navigate to Settings → Automations & Scenes → Create Automation.

Option 1: Using the UI (Easiest)

  1. Trigger: Select “State” trigger
    • Entity: device_tracker.your_phone_name
    • From: not_home
    • To: home
  2. Condition: (Optional) Add time-based condition
    • Only trigger after sunset or before sunrise
  3. Action: Add actions to control your devices
    • Turn on entry lights
    • Set thermostat to comfortable temperature
    • Send notification

Option 2: Using YAML (Advanced)

For more control, you can edit automations.yaml directly:

automation:
  - alias: "Welcome Home Automation"
    description: "Turn on lights and adjust climate when arriving home"
    trigger:
      - platform: state
        entity_id: device_tracker.your_phone_name
        from: "not_home"
        to: "home"
    condition:
      - condition: sun
        after: sunset
    action:
      - service: light.turn_on
        target:
          entity_id: light.entry_lights
        data:
          brightness_pct: 80
          color_temp: 370
      - service: climate.set_temperature
        target:
          entity_id: climate.main_floor
        data:
          temperature: 72
      - service: notify.mobile_app_your_phone
        data:
          message: "Welcome home! Lights and climate adjusted."
          title: "Home Assistant"

Step 3: Add Smart Conditions

Make your automation even smarter by adding conditions:

  • Only trigger after sunset: No need to turn on lights during daytime
  • Check if anyone else is home: Skip the automation if family members are already there
  • Weather-based adjustments: Set different climate temperatures based on outdoor conditions

Step 4: Test Your Automation

Before relying on your automation, test it thoroughly:

  1. Use the “Run Actions” button in the automation editor
  2. Manually change your device tracker state in Developer Tools
  3. Actually leave and return home to test real-world behavior

Troubleshooting Tips

Automation Not Triggering?

  • Check that device tracking is enabled in the Companion app
  • Verify location permissions are granted on your phone
  • Review automation traces in Settings → Automations → [Your Automation] → Traces

Lights Not Responding?

  • Ensure your smart devices are online and connected
  • Test manual control through the Home Assistant UI
  • Check entity IDs match exactly (case-sensitive)

Taking It Further

Once you have the basic automation working, consider these enhancements:

  • Multi-user tracking: Create different welcome scenes for each family member
  • Context-aware actions: Different behaviors based on time of day, season, or calendar events
  • Voice announcements: Use a smart speaker to welcome you home
  • Security integration: Disarm security system when arriving

Recommended Products

To expand your presence detection and automation capabilities, check out these products:

Conclusion

Presence detection automations are just the beginning of what’s possible with Home Assistant. By combining device tracking with smart conditions and actions, you can create a truly intelligent home that responds to your daily routines.

Have questions about this automation or ideas for other Home Assistant tutorials? Drop a comment below!


Affiliate Disclosure: This post contains Amazon affiliate links. When you purchase through these links, I may earn a small commission at no additional cost to you. This helps support the site and allows me to continue creating Home Assistant tutorials. All recommendations are based on personal experience and research. See our full disclosure policy.