Skip to content

nicx17/unstats

Repository files navigation

Unstats for Home Assistant

GitHub Release License: GPL v3 hacs_badge

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.


Provided Sensors

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.


Installation

Method 1: HACS (Recommended)

  1. Navigate to HACS in Home Assistant.
  2. Click Integrations.
  3. Search for "Unstats" and click Download.
  4. 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.)

Method 2: Manual

  1. Download the latest release from the Releases page.
  2. Unzip and copy the custom_components/unstats folder into your Home Assistant's config/custom_components/ directory.
  3. Restart Home Assistant.

Configuration

Setup is done entirely through the Home Assistant UI. No .env files or YAML configuration required!

  1. Go to Settings > Devices & Services in Home Assistant.
  2. Click Add Integration in the bottom right corner.
  3. Search for "Unstats".
  4. Enter your Unsplash Username.
  5. Click Submit. The integration will verify your username and setup your sensors automatically.

Data & Privacy

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:

  1. The integration sends a request containing only your Unsplash Username to https://un.hyclotron.com.
  2. The proxy server attaches the required Unsplash API credentials and queries the public Unsplash API.
  3. 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.

Removal

  1. Go to Settings > Devices & Services.
  2. Open Unstats.
  3. Use the three-dot menu and choose Delete.
  4. Confirm the removal to delete the config entry and its entities.

Issues & Support

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.

About

Home Assistant custom integration for Unsplash account statistics (views, downloads, likes) with HACS support.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages