- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| custom_components/youtube_subscribers | ||
| tests | ||
| .gitignore | ||
| hacs.json | ||
| README.md | ||
YouTube Subscribers for Home Assistant
Custom Home Assistant integration that exposes a YouTube channel's current public
subscriber count, video count, and total view count as three sensors. It defaults to
@LinuxRenaissance and uses the official YouTube Data API v3.
Installation
HACS (custom repository)
- Add this repository to HACS as an Integration custom repository.
- Install YouTube Subscribers and restart Home Assistant.
Manual
Copy custom_components/youtube_subscribers into the custom_components directory in
your Home Assistant configuration, then restart Home Assistant.
Configuration
- In Google Cloud Console, enable YouTube Data API v3 and create an API key.
- In Home Assistant open Settings → Devices & services → Add integration.
- Search for YouTube Subscribers.
- Enter the API key and
LinuxRenaissance(with or without@).
The API key is stored in Home Assistant's config-entry storage and is not written into this repository. The default update interval is 5 minutes. Change it from the integration's Configure button.
The integration creates Subscribers, Videos, and Views sensors. YouTube may return a rounded subscriber count for channels above certain sizes. Each sensor also includes the channel URL, channel ID, and whether the subscriber count is hidden.
API quota
The integration performs one channels.list request per update. At the default interval
that is 288 requests per day. Avoid a needlessly short interval.