home-assistant / home-assistant.io

:blue_book: Home Assistant User documentation
https://www.home-assistant.io
Other
4.97k stars 7.28k forks source link

No more avaiable #17288

Closed davidelolli closed 3 years ago

davidelolli commented 3 years ago

Feedback

goodmorning, i'm having problems in the last days with this, now i've figured out that the integration is no more avaiable.

URL

https://www.home-assistant.io/integrations/socialblade/

Version

2021.3.4

frenck commented 3 years ago

The integration is pending removal for Home Assistant Core 2021.5.0

SeanPM5 commented 3 years ago

Here's a quick alternative I whipped up. You will need a YouTube API key (free, instructions).

sensor:
  - platform: rest
    name: YouTube
    resource: "https://www.googleapis.com/youtube/v3/channels?part=statistics&id=UCbX3YkedQunLt7EQAdVxh7w&key=YOUR_YOUTUBE_API_KEY_HERE"
    scan_interval: 3600 # one hour
    value_template: '{{ value_json["items"][0]["statistics"].subscriberCount }}'
    json_attributes_path: "$.items.[0].statistics"
    json_attributes:
      - viewCount
      - subscriberCount
      - videoCount

This doesn't scrape the Social Blade website but instead uses YouTube's official API, so it should remain stable and have more up to date information (as you're removing the "middle man" in this case). That example is for HA's YouTube channel, replace the ID part with your own channel ID obviously.