A comprehensive Home Assistant integration for monitoring and controlling Google Family Link devices. Track screen time, manage time limits, control bedtime/school schedules, and manage time bonuses directly from Home Assistant.
This integration uses unofficial, reverse-engineered Google Family Link API endpoints. Use at your own risk. This may violate Google's Terms of Service and could result in account suspension. This project is not affiliated with, endorsed by, or connected to Google LLC.
- Lock/Unlock Devices - Control device access with switches in Home Assistant
- Real-time Synchronization - Lock state automatically syncs with Google Family Link
- Multi-device Support - Manage multiple supervised devices
- Bi-directional Control - Changes made in Family Link app reflect in Home Assistant
- Bedtime Control - Enable/disable bedtime (downtime) restrictions
- Set Bedtime Schedule - Modify bedtime start/end times for any day (or today by default)
- School Time Control - Enable/disable school time restrictions
- Daily Limit Control - Enable/disable daily screen time limits (0-1440 minutes)
- Set Daily Limit - Change daily screen time limit duration per device
- Time Bonuses - Add extra time (15min, 30min, 60min) or cancel active bonuses
- Smart Detection - Automatically detects when device is in bedtime/school time window
- Schedule Visibility - View bedtime and school time schedules in sensor attributes
- Daily Screen Time - Track total daily usage per child
- Screen Time Remaining - See remaining time per device (accounts for bonuses and used time)
- Daily Limit Tracking - Monitor daily limit quota per device
- Active Bonus Display - See active time bonuses per device
- Top 10 Apps - Monitor most-used apps with detailed usage statistics
- App Breakdown - Per-application usage breakdown
- Installed Apps Count - Total number of apps on supervised devices
- Blocked Apps - List and count of blocked/hidden apps
- Apps with Time Limits - Track apps with usage restrictions
- App Details - Package names, titles, and limit information
- Device Tracker - Track your child's location via
device_trackerentity - Place Detection - Automatically shows when child is at a saved place (Home, School, etc.)
- Address Display - Full address of current location
- Source Device - Shows which device provided the location
- Battery Level - Monitor battery percentage of the location source device
- Privacy First - Disabled by default, opt-in via configuration
β οΈ Warning - Each location poll may notify the child's device
- Profile Details - Child's name, email, birthday, age band
- Device Information - Device model, name, capabilities, last activity
- Family Members - List of all family members with roles
device_tracker.<child>- Child's GPS location- State:
home,not_home, or zone name - Attributes:
source_device- Device name providing the locationplace_name- Saved place name (e.g., "Home", "School")address- Full address of the locationlocation_timestamp- When the location was capturedbattery_level- Battery percentage of source device
- Note: Requires enabling "GPS location tracking" in integration config
- State:
sensor.<child>_battery_level- Battery level of location source device- State: Battery percentage (0-100%)
- Device Class:
battery - Attributes:
source_device- Device name providing the battery datalast_update- Timestamp of last update
- Note: Requires enabling "GPS location tracking" in integration config
β οΈ Limitation: Shows battery of the device selected for location tracking in Family Link app, not all devices
switch.<child>_bedtime- Enable/disable bedtime restrictionsswitch.<child>_school_time- Enable/disable school time restrictionsswitch.<child>_daily_limit- Enable/disable daily screen time limit
sensor.<device>_screen_time_remaining- Remaining screen time in minutessensor.<device>_next_restriction- Next upcoming restriction (bedtime/school time)sensor.<device>_daily_limit- Daily limit quota in minutessensor.<device>_active_bonus- Active time bonus in minutes
binary_sensor.<device>_bedtime_active- Currently in bedtime window- Attributes:
bedtime_start,bedtime_end(ISO timestamps)
- Attributes:
binary_sensor.<device>_school_time_active- Currently in school time window- Attributes:
schooltime_start,schooltime_end(ISO timestamps)
- Attributes:
binary_sensor.<device>_daily_limit_reached- Daily limit reached (true/false, ignores bonuses)
switch.<device>- Lock/unlock device- ON = Device unlocked (child can use device) π±
- OFF = Device locked (device is locked) π
button.<device>_15min- Add 15 minutes bonusbutton.<device>_30min- Add 30 minutes bonusbutton.<device>_60min- Add 60 minutes bonusbutton.<device>_reset_bonus- Cancel active bonus (only available when bonus is active)
sensor.<child>_daily_screen_time- Daily screen time in minutessensor.<child>_screen_time_formatted- Daily screen time in HH:MM:SS formatsensor.<child>_installed_apps- Number of installed appssensor.<child>_blocked_apps- Number and list of blocked appssensor.<child>_apps_with_time_limits- Apps with usage restrictionssensor.<child>_top_app_1throughsensor.<child>_top_app_10- Top 10 most-used appssensor.<child>_device_count- Number of supervised devicessensor.<child>_child_info- Supervised child's profile information
New set_app_daily_limit service to control screen time per application:
# Set TikTok to 60 minutes/day for ALL children
service: familylink.set_app_daily_limit
data:
package_name: com.zhiliaoapp.musically
minutes: 60
# Remove the limit (restore unlimited)
service: familylink.set_app_daily_limit
data:
package_name: com.zhiliaoapp.musically
minutes: 0App control services now apply to ALL children by default:
block_app,unblock_app, andset_app_daily_limitaffect all supervised children when no specific child is selected- Use
entity_idorchild_idto target a specific child
# Block YouTube for a specific child only
service: familylink.block_app
data:
package_name: com.youtube.android
entity_id: sensor.emma_screen_time- New
async_get_all_supervised_children()method - New
async_set_app_daily_limit()method
This project consists of two components that work together:
Provides secure, browser-based authentication:
- Playwright Automation - Headless Chromium for Google login
- 2FA Support - Handles SMS, authenticator, and push notifications
- Cookie Extraction - Securely stores authentication cookies
- Auto-refresh - Keeps authentication fresh
Provides monitoring and control:
- Config Flow - User-friendly setup wizard
- API Client - Communicates with Google Family Link API
- Coordinator - Manages data updates and caching
- Entities - Sensors, binary sensors, switches, and buttons
Home Assistant's Docker environment restricts browser automation. The add-on runs in a separate container with Chromium and Playwright, while the integration handles data fetching and device control.
See the detailed Installation Guide for step-by-step instructions.
π Note for Home Assistant Core/Container Users
If you're running Home Assistant without Supervisor (Core or Container installation), you'll need to run the authentication add-on as a standalone Docker container. See the Docker Standalone Guide for detailed instructions.
- Install Family Link Auth Add-on
- Add repository to Home Assistant
- Install and start the add-on
- Authenticate via Web UI (uses noVNC in your browser - see Installation Guide)
- Install Integration
- Via HACS (recommended) or manually
- Configure through Home Assistant UI
- Cookies automatically loaded from add-on
- Enjoy!
- Monitor screen time
- Control time limits
- Manage bonuses
- Create automations
This integration is configured entirely through the Home Assistant UI (Config Flow). YAML configuration is not supported.
- Go to Settings β Devices & Services β Add Integration
- Search for "Family Link" and select it
- Configure the following options in the setup wizard:
- Name: Display name for the integration (default: "Google Family Link")
- Update Interval: How often to fetch data, in seconds (default: 300, range: 30-3600)
- Timeout: API request timeout in seconds (default: 30)
- Enable GPS Location Tracking: Opt-in for device location tracking (default: disabled)
The default update interval is 5 minutes (300 seconds). You can change this value during initial setup or by reconfiguring the integration:
- Go to Settings β Devices & Services
- Find the Family Link integration
- Click Configure to modify settings
Device states are fetched from Google's appliedTimeLimits API endpoint. Changes made from the Family Link app or website are reflected in Home Assistant within the next update cycle.
This integration uses reverse-engineered Google Family Link API endpoints:
| Endpoint | Purpose |
|---|---|
/families/mine/members |
Family member information |
/families/mine/location/{userId} |
Child GPS location |
/people/{userId}/apps |
Installed apps list |
/people/{userId}/appsandusage |
App usage data |
/people/{userId}/timeLimitOverrides:batchCreate |
Lock/unlock devices, add time bonuses |
/people/{userId}/timeLimitOverride/{id}?$httpMethod=DELETE |
Cancel time bonuses |
/people/{userId}/appliedTimeLimits |
Current time limits and lock states |
/people/{userId}/timeLimit |
Time limit rules and schedules |
/people/{userId}/timeLimit:update |
Enable/disable bedtime, school time, daily limit |
Symptoms: Logs show "401 Unauthorized" errors
Solutions:
- Verify Family Link Auth add-on is running
- Check API is accessible:
curl http://localhost:8099/api/cookies(or your addon IP) - For file fallback: Check
/share/familylink/cookies.encand.keyexist - Restart add-on to refresh authentication
- Reload integration in Home Assistant
Symptoms: Device lock state doesn't reflect actual state
Solutions:
- Check logs for API errors
- Verify device is online and connected
- Wait for next update cycle (default: 5 minutes)
- Manually lock/unlock from Family Link app to test sync
Symptoms: Binary sensors always show "off"
Solutions:
- Verify schedules are configured in Family Link app
- Check sensor attributes for
bedtime_startandbedtime_endtimestamps - Ensure schedules are enabled for current day of week
- Check Home Assistant timezone matches your actual timezone
Symptoms: Some sensors don't show data
Cause:
- Child-level schedule sensors removed in v0.8.0 (use device-level binary sensors instead)
- No app usage data for current date
Solution:
- Manually delete old entities from UI
- Wait until child uses apps today for usage data
Symptoms: "Session expired" errors in logs
Solution:
- Open add-on Web UI (port 8099)
- Click "Start Authentication"
- Complete Google login
- Integration automatically picks up new cookies
automation:
- alias: "Lock phone at bedtime"
trigger:
- platform: time
at: "21:00:00"
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: switch.turn_off
target:
entity_id: switch.child_phoneautomation:
- alias: "Enable bedtime on weeknights"
trigger:
- platform: time
at: "20:00:00"
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
action:
- service: switch.turn_on
target:
entity_id: switch.firstname_lastname_bedtimeautomation:
- alias: "Alert on excessive screen time"
trigger:
- platform: numeric_state
entity_id: sensor.galaxy_tab_firstname_screen_time_remaining
below: 30 # Less than 30 minutes remaining
action:
- service: notify.mobile_app
data:
message: "Only {{ states('sensor.galaxy_tab_firstname_screen_time_remaining') }} minutes remaining!"automation:
- alias: "Bonus time for homework"
trigger:
- platform: state
entity_id: input_boolean.homework_done
to: "on"
action:
- service: button.press
target:
entity_id: button.galaxy_tab_firstname_30min
- service: notify.mobile_app
data:
message: "Good job! Added 30 minutes bonus time."automation:
- alias: "Notify when daily limit reached"
trigger:
- platform: state
entity_id: binary_sensor.galaxy_tab_firstname_daily_limit_reached
to: "on"
action:
- service: notify.mobile_app
data:
message: "{{ trigger.to_state.attributes.device_name }} has reached its daily limit"automation:
- alias: "Notify when child leaves school"
trigger:
- platform: state
entity_id: device_tracker.firstname
from: "School"
action:
- service: notify.mobile_app_parent
data:
message: "{{ trigger.to_state.name }} has left school"
- alias: "Notify when child arrives home"
trigger:
- platform: state
entity_id: device_tracker.firstname
to: "home"
action:
- service: notify.mobile_app_parent
data:
message: "{{ trigger.to_state.name }} is home!"-
v1.0.0 (2026-01) - Per-App Time Limits & Multi-Child Support π
- New service
set_app_daily_limit- Set daily time limits per app (e.g., 60 min for TikTok) - Multi-child support -
block_app,unblock_app,set_app_daily_limitapply to ALL children by default - Optional
entity_idandchild_idparameters for targeting specific children
- New service
-
v0.9.8 (2026-01) - Battery Level Support
- Battery Level Sensor - Monitor battery % of location source device
- Requires location tracking to be enabled
- Shows battery of the device selected for location in Family Link app
-
v0.9.7 (2025-12) - Regional Google Domains Auth Fix
- Fixed authentication loop with regional Google domains (.google.com.au, .google.co.uk, etc.)
-
v0.9.6 (2025-12) - Set Bedtime Service
- New
familylink.set_bedtimeservice to modify bedtime schedules dynamically - Fixed authentication issues
set_daily_limitnow accepts 0 minutes to disable device
- New
-
v0.9.5 (2025-11) - Bedtime/School Time Toggle Fix
- Fixed bedtime/school time toggle (was using hardcoded UUIDs)
- Now dynamically fetches rule IDs from timeLimit API
-
v0.9.4 (2025-11) - GPS Location & Docker Standalone
- GPS Device Tracker - Track child location via
device_trackerentity- Opt-in configuration (disabled by default for privacy)
- Shows saved places (Home, School) and full address
- Docker Standalone Mode - Run without Home Assistant Supervisor
- HTTP API for cookie retrieval
- Separate Docker images for addon vs standalone
- Entity Selectors - Services now show entity pickers in UI
- French & English translations - Full i18n support
- Auth Notification Fix - Properly triggers when session expires (no spam)
- Bug Fixes - Fixed set_daily_limit dynamic day codes, bashio errors
- GPS Device Tracker - Track child location via
-
v0.9.3 (2025-11) - Set Daily Limit Fix
- Fixed
set_daily_limitapplying to wrong day of week
- Fixed
-
v0.9.2 (2025-11) - Standalone Docker Fix
- Fixed bashio errors in standalone Docker deployment
- Created separate Docker images for HA OS/Supervised vs pure Docker
-
v0.9.1 (2025-11) - Auth Expiration Notification
- Persistent notification when Google authentication expires
- Re-authentication instructions included
- "No app usage data" moved from warning to debug log
-
v0.8.0 (2025-01) - Release Candidate
- Time bonus management (add/cancel bonuses)
- Enhanced per-device sensors (daily limit, active bonus, screen time remaining)
- Fixed bedtime/school time window parsing
- Fixed time calculations (bonus replaces time, not adds)
- Daily Limit Reached sensor returns true/false
- Removed redundant child-level schedule sensors
-
v0.7.6 (2025-01) - Bonus cancellation and fixes
- Parse bonus override_id from API
- Reset Bonus button implementation
- Fixed bonus detection false positives
- Fixed used time parsing (position 20)
-
v0.7.4 (2025-01) - Bedtime/School Time parsing
- Complete bedtime window parsing
- Complete school time window parsing
- Midnight-crossing support
- Binary sensors for active detection
-
v0.6.5 (2024-12) - Stable base version
- Bedtime, School Time, Daily Limit switches
- Device lock/unlock functionality
- Screen time monitoring
-
v0.5.0 - Real-time device lock state synchronization
-
v0.4.x - Device lock/unlock functionality
-
v0.3.0 - App usage and screen time sensors
-
v0.2.x - Authentication fixes and improvements
-
v0.1.0 - Initial release
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Make your changes with clear commit messages
- Test thoroughly
- Submit a pull request
git clone https://github.com/noiwid/HAFamilyLink.git
cd HAFamilyLink
python -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txtThis project is licensed under the MIT License - see the LICENSE file for details.
- Developed by @noiwid
- Based on the original work by @tducret (Python package documenting Family Link API endpoints)
- Inspired by @Vortitron's HAFamilyLink repository
- Home Assistant community for integration examples and best practices
- Reverse engineering insights from browser DevTools analysis
This is an unofficial integration and is not affiliated with, endorsed by, or connected to Google LLC. All product names, logos, and brands are property of their respective owners. Use at your own risk.