A Home Assistant custom component for integrating Playmetrics sports scheduling into your smart home.
- Fetches upcoming games, practices, and events from Playmetrics
- Displays events with team, location, and time information
- Shows cancelled events with clear markers
- Configurable look-ahead period (default 7 days)
- Automatic updates at configurable intervals
- Copy the
custom_components/playmetricsdirectory to your Home Assistant'scustom_componentsdirectory - Restart Home Assistant
- Go to Configuration -> Integrations
- Click the "+ Add Integration" button
- Search for "Playmetrics"
- Follow the configuration steps
This integration can be added to HACS as a custom repository:
- Open HACS in Home Assistant
- Click on "Integrations"
- Click the three dots in the top right corner
- Select "Custom repositories"
- Add this repository URL
- Select "Integration" as the category
- Click "Add"
- Search for "Playmetrics" and install
During setup, you'll need to provide:
- Email: Your Playmetrics account email
- Password: Your Playmetrics account password
- Role ID: Your Playmetrics role ID (found in the app)
- Days to look ahead: Number of days to fetch events for (default: 7)
- Update interval (hours): Hours between automatic updates (default: 6, range: 1-24)
- Log in to Playmetrics web app
- Open your browser's developer tools (F12)
- Go to the Network tab
- Navigate to your schedule
- Look for API calls to
api.playmetrics.com - Find the
role_idparameter in the request
After configuration, a sensor will be created: sensor.playmetrics_schedule
The sensor state shows the number of upcoming events, e.g., "3 events"
The sensor provides these attributes:
events: List of formatted event stringsevent_count: Number of upcoming eventsfuture_days: Days being looked aheadlast_update: Timestamp of last successful update
- On Home Assistant startup/reboot: Fresh data is fetched immediately from the Playmetrics API
- Automatic updates: Data refreshes every X hours based on your configured update interval
- Entity persistence: Sensor state and attributes persist through reboots
Each event in the events attribute is formatted as:
Day Mon DD, HH:MM AM/PM to HH:MM AM/PM | Event Title (Team Name) @ Location
Cancelled events include: ❌ CANCELLED
automation:
- alias: "Notify of upcoming game"
trigger:
- platform: state
entity_id: sensor.playmetrics_schedule
condition:
- condition: template
value_template: "{{ trigger.to_state.attributes.event_count > 0 }}"
action:
- service: notify.mobile_app
data:
title: "Upcoming Playmetrics Events"
message: >
{{ trigger.to_state.attributes.events | join('\n') }}type: markdown
content: |
## Playmetrics Schedule
{% for event in state_attr('sensor.playmetrics_schedule', 'events') %}
- {{ event }}
{% endfor %}- Verify your email and password are correct
- Ensure your Role ID is valid
- Check that you can log in to Playmetrics web app
- Verify you have events scheduled in Playmetrics
- Check the
future_dayssetting - Look at the sensor's
last_updateattribute
Check the Home Assistant logs for detailed error messages:
Configuration -> Logs -> Filter by "playmetrics"
For issues and feature requests, please open an issue on GitHub.
This project is licensed under the Apache License 2.0.
This is an unofficial integration and is not affiliated with or endorsed by Playmetrics.