Skip to content

cd1zz/homeassistant-carpoolkids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Carpool Kids Custom Component for Home Assistant

This is a custom Home Assistant integration for monitoring Carpool Kids schedules. It was converted from the AppDaemon script to a proper Home Assistant custom component.

Features

  • Track today's carpool events
  • View upcoming carpool events
  • Monitor the next scheduled event
  • Individual sensors for the next 5 events
  • Status monitoring
  • UI-based configuration (Config Flow)
  • Automatic updates every hour

Installation

Manual Installation

  1. Copy the custom_components/carpool_kids folder to your Home Assistant config/custom_components directory.

    Your directory structure should look like:

    config/
      custom_components/
        carpool_kids/
          __init__.py
          manifest.json
          config_flow.py
          sensor.py
          carpool_api.py
          const.py
          strings.json
    
  2. Restart Home Assistant

  3. Go to SettingsDevices & ServicesAdd Integration

  4. Search for "Carpool Kids" and select it

  5. Enter your configuration:

    • Email: Your Carpool Kids account email
    • Android ID: Your device's Android ID (see below for how to obtain)
    • Token: Your Google authentication token (see below for how to obtain)
  6. Click Submit

Obtaining Credentials

To use this integration, you need to obtain your Android ID and authentication token:

Android ID

  1. Install Device ID on your Android device
  2. Open the app and copy the "Android ID" value
  3. Use this value in the integration setup

Authentication Token

  1. Install TokenForGApps or similar token extraction tool
  2. Request a token for the email account linked to Carpool Kids
  3. Copy the "Token" value (starts with "aas_et/")
  4. Use this value in the integration setup

Note: These credentials are stored securely in your Home Assistant configuration and are only used to authenticate with the Carpool Kids API.

Sensors

The integration creates the following sensors:

Main Sensors

  • sensor.carpool_today - Count of today's carpool events

    • Attributes include the full list of today's events with details
  • sensor.carpool_upcoming - Count of upcoming carpool events

    • Attributes include up to 10 upcoming events with details
  • sensor.carpool_next_event - Next scheduled carpool event

    • Shows date and time of the next event
    • Attributes include location, driver, and rider count
  • sensor.carpool_status - Integration status

    • Shows "online" or "error"
    • Attributes include last update time and total event count

Individual Event Sensors

  • sensor.carpool_event_1 through sensor.carpool_event_5
    • Each shows details for one of the next 5 events
    • Includes date, location, and leg information

Event Data Structure

Each event includes:

  • Date and day of week
  • Location
  • Legs (pickup/dropoff times)
    • Time (formatted as 12-hour)
    • Driver name
    • Number of seats
    • List of riders with parent names

Automation Examples

Notification Before Next Event

automation:
  - alias: "Carpool Reminder"
    trigger:
      - platform: time
        at: "07:00:00"
    condition:
      - condition: template
        value_template: "{{ states('sensor.carpool_today') != 'none' }}"
    action:
      - service: notify.mobile_app
        data:
          title: "Carpool Today"
          message: >
            Next carpool: {{ state_attr('sensor.carpool_next_event', 'time') }}
            at {{ state_attr('sensor.carpool_next_event', 'location') }}
            Driver: {{ state_attr('sensor.carpool_next_event', 'driver') }}

Dashboard Card

type: entities
entities:
  - entity: sensor.carpool_next_event
  - entity: sensor.carpool_today
  - entity: sensor.carpool_upcoming
  - entity: sensor.carpool_status
title: Carpool Schedule

Differences from AppDaemon Version

The custom component version has several improvements over the AppDaemon script:

  1. UI Configuration: No need to edit YAML files, configure through the UI
  2. Better Integration: Uses Home Assistant's native entity system
  3. Data Coordinator: Efficient data updates with automatic retry logic
  4. Entity Management: Proper entity lifecycle management
  5. Error Handling: Better error reporting and recovery
  6. Standards Compliant: Follows Home Assistant integration best practices

Troubleshooting

Integration Not Appearing

  • Make sure you restarted Home Assistant after copying the files
  • Check that the folder structure is correct
  • Look in Home Assistant logs for any errors

Authentication Failures

  • Verify your email address, Android ID, and token are correct
  • Check Home Assistant logs for specific error messages
  • Your token may expire and need to be regenerated periodically
  • Ensure you're using the correct token format (should start with "aas_et/")

No Events Showing

  • Check sensor.carpool_status to see if updates are working
  • Verify you have events scheduled in the Carpool Kids app
  • Look at the last_update attribute on the status sensor

Development

This integration was converted from an AppDaemon script to follow Home Assistant's modern integration architecture based on the official documentation at https://developers.home-assistant.io/docs/creating_component_index

Support

For issues and feature requests, please use the GitHub repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages