Home Assistant integration for real-time commute briefings with traffic, weather, and transport updates
Features β’ Installation β’ Configuration β’ Contributing
| Feature | Description |
|---|---|
| π¦ Real-time Traffic | Live traffic conditions on your commute route |
| π€οΈ Weather Briefing | Current conditions and forecast for departure |
| π Transit Updates | Public transport delays and disruptions |
| ποΈ Voice Announcements | TTS briefings via smart speakers |
| β° Smart Scheduling | Briefings based on your work schedule |
| π Commute Stats | Track and analyze commute times |
| π Scraper Microservice | Real-time data collection |
| π HACS Compatible | Easy installation via HACS |
| Requirement | Version |
|---|---|
| Home Assistant | 2023.1+ |
| HACS | Latest |
| Python | 3.11+ (for scraper) |
- Google Maps API (or alternative)
- Weather integration (e.g., Met Office, OpenWeatherMap)
- TTS service (optional, for voice briefings)
- Open HACS in Home Assistant
- Click Integrations β + Explore & Download Repositories
- Search for "HA Commute Helper"
- Click Download
- Restart Home Assistant
# Clone the repository
cd /config
git clone https://github.com/CaputoDavide93/ha-commute-helper.git
# Copy custom component
cp -r ha-commute-helper/custom_components/commute_helper custom_components/
# Copy packages
cp -r ha-commute-helper/packages/* packages/
# Restart Home Assistant# Deploy scraper
cd scraper-microservice
docker-compose up -dCopy and edit the secrets template:
cp secrets_template.yaml secrets.yaml# secrets.yaml
commute_origin: "Your Home Address"
commute_destination: "Your Work Address"
google_maps_api_key: "your-api-key"
weather_api_key: "your-weather-key"# configuration.yaml
homeassistant:
packages: !include_dir_named packages/
commute_helper:
origin: !secret commute_origin
destination: !secret commute_destination
arrival_time: "09:00"
departure_sensor: sensor.commute_departure_timeautomation:
- alias: "Morning Commute Briefing"
trigger:
- platform: time
at: "07:00"
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: "on"
action:
- service: tts.speak
entity_id: media_player.kitchen_speaker
data:
message: "{{ state_attr('sensor.commute_briefing', 'full_text') }}"| Entity | Description |
|---|---|
sensor.commute_time |
Current estimated commute (minutes) |
sensor.commute_departure_time |
Recommended departure time |
sensor.commute_briefing |
Full text briefing |
binary_sensor.commute_delayed |
True if delays detected |
sensor.commute_traffic_level |
Traffic severity (low/medium/high) |
type: entities
title: Morning Commute
entities:
- entity: sensor.commute_time
name: Travel Time
- entity: sensor.commute_departure_time
name: Leave By
- entity: sensor.commute_traffic_level
name: Traffic
- entity: sensor.weather_temperature
name: Temperaturegraph TD
A[Scraper Microservice] --> B[Home Assistant]
C[Google Maps API] --> B
D[Weather API] --> B
E[Transit API] --> B
B --> F[Sensor Entities]
F --> G[Automations]
G --> H[TTS / Notifications]
ha-commute-helper/
βββ custom_components/
β βββ commute_helper/
β βββ __init__.py
β βββ manifest.json
β βββ sensor.py
βββ packages/
β βββ commute_helper.yaml
βββ scraper-microservice/
β βββ Dockerfile
β βββ docker-compose.yml
β βββ main.py
βββ hacs.json
βββ secrets_template.yaml
"Good morning! Your commute to work is currently 35 minutes due to moderate traffic on the M25. The weather is partly cloudy at 12 degrees. Leave by 8:25 to arrive on time. Have a great day!"
# In packages/commute_helper.yaml
template:
- sensor:
- name: "Commute Briefing"
state: "{{ states('sensor.commute_time') }} min"
attributes:
full_text: >
Good morning! Your commute is {{ states('sensor.commute_time') }} minutes.
{% if states('sensor.commute_traffic_level') != 'low' %}
There is {{ states('sensor.commute_traffic_level') }} traffic.
{% endif %}
Temperature is {{ states('sensor.weather_temperature') }}Β°.β Entity Not Found
# Check if component loaded
ha core info
# Verify configuration
ha core checkβ API Rate Limit
Reduce polling frequency in configuration:
commute_helper:
scan_interval: 600 # 10 minutesβ Scraper Not Connecting
# Check scraper logs
docker-compose logs -f scraper
# Verify network connectivity
curl http://localhost:8080/healthContributions are welcome! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.