Closes - Add in YouTube Sensors

This commit is contained in:
ccostan 2020-06-27 13:05:13 -04:00
parent a34b33b8bf
commit 199b79d6ec
2 changed files with 34 additions and 2 deletions
config

32
config/packages/youtube.yaml Executable file

@ -0,0 +1,32 @@
#-------------------------------------------
# Visit The Main Blog for More Home Assistant Goodness - https://www.vCloudInfo.com
# Follow me on the socials - @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# YouTube Related Packages from @Pinkywafer
# https://github.com/pinkywafer/Home-Assistant_Config/blob/master/packages/youtube/vcloudinfo.yaml
# More information found here in these issues
# https://github.com/CCOSTAN/Home-AssistantConfig/issues/720
#-------------------------------------------
sensor:
- platform: youtube
channel_id: UC301G8JJFzY0BZ_0lshpKpQ
- platform: socialblade
name: vCloudinfo_info
channel_id: UC301G8JJFzY0BZ_0lshpKpQ
automation:
- alias: YouTube Notification - vCloudInfo
trigger:
- platform: state
entity_id: sensor.vcloudinfo
action:
- service: script.tweet_engine_image
data_template:
tweet: >
{{ [
"New Video! {{ states('sensor.vcloudinfo_info') }} - {{ state_attr('sensor.vcloudinfo','url') }} "
] | random }}
image: "{{state_attr('sensor.vcloudinfo','entity_picture')}}"

@ -18,7 +18,7 @@ tweet_engine_setup:
"Your house can be a #smarthome too. All you need is #home_assistant, some time and some config files. I suggest starting with our GitHub repo (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",
"Be sure to like us on Facebook to get all post notifications (https://www.facebook.com/vcloudinfo/)",
"You can see how ALL of this is done by browsing my GitHub Repository (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",
"If you are not subscribed to our YouTube channel, you are missing out on the goodies! (https://youtube.com/vCloudInfo)",
"If you are not subscribed to our YouTube channel like {{ states('sensor.vcloudinfo_info') }} others, you are missing out on the goodies! (https://youtube.com/vCloudInfo)",
"Join our GitHub repo (https://github.com/CCOSTAN/Home-AssistantConfig#logo) with {{ states.sensor.github_stats.attributes.stargazers_count}} other users. Browse the {{ states.sensor.github_stats.attributes.open_issues }} #Todo items.",
"Check out my Cameo on @feinbergpaul inspiring video. (https://www.youtube.com/watch?v=5rsdwJZ0SLY&feature=youtu.be&t=85) #GoCreate #nosmallcreator ",
"Quick YouTube cameo on #HomeKit #Geeks channel. Check it out! (https://youtu.be/3tutxHO0J78?t=872) "
@ -125,7 +125,7 @@ tweet_engine_setup:
"joke": [
"Visit the Repo (https://github.com/CCOSTAN/Home-AssistantConfig#logo) ",
"Like and follow for more of these #HomeAutomation gems! ",
"Visit https://YouTube.com/vCloudInfo "
"Join {{ states('sensor.vcloudinfo_info') }} other subscribers and visit https://YouTube.com/vCloudInfo "
]
} %}