A Home Assistant custom integration to fetch your Unsplash statistics natively. Instead of relying on external cron-jobs or scripts, this integration polls your Unsplash stats from within Home Assistant and provisions persistent sensors for your views and downloads.
When configured, this integration provisions two total-increasing sensors:
- Views
- Downloads
Home Assistant will generate entity IDs for the configured account automatically.
Note: The sensors automatically update every 60 minutes.
- Navigate to HACS in Home Assistant.
- Click Integrations.
- Search for "Unstats" and click Download.
- Restart Home Assistant.
(Note: Currently pending addition to the HACS default store. Until merged, you may add https://github.com/nicx17/unstats as a custom integration repository.)
- Download the latest release from the Releases page.
- Unzip and copy the
custom_components/unstatsfolder into your Home Assistant'sconfig/custom_components/directory. - Restart Home Assistant.
Setup is done entirely through the Home Assistant UI. No .env files or YAML configuration required!
- Go to Settings > Devices & Services in Home Assistant.
- Click Add Integration in the bottom right corner.
- Search for "Unstats".
- Enter your Unsplash Username.
- Click Submit. The integration will verify your username and setup your sensors automatically.
To fetch statistics without requiring users to set up complex Unsplash Developer OAuth applications, this integration utilizes a proxy server hosted by the developer.
How it works:
- The integration sends a request containing only your Unsplash Username to
https://un.hyclotron.com. - The proxy server attaches the required Unsplash API credentials and queries the public Unsplash API.
- The proxy server returns the exact stripped JSON response back to Home Assistant.
Privacy Guarantee:
- No personal data is stored, logged, or tracked on the proxy server.
- No passwords or API keys are ever required from the user.
- Go to Settings > Devices & Services.
- Open Unstats.
- Use the three-dot menu and choose Delete.
- Confirm the removal to delete the config entry and its entities.
If you run into any issues or want to request a feature, please open an issue on GitHub.
Icon Attribution: Illustration by Compagnons on Unsplash
License: This project utilizes the GPL-3.0 License.