2020-12-03 05:11:24 +00:00
#-------------------------------------------
# I totally stole this from @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
#-------------------------------------------
2021-08-04 19:57:44 +00:00
sensor :
- platform : youtube
channel_id : UCipZJ6748kd8TbelSxcvcVg
2021-05-24 15:47:55 +00:00
2020-12-03 05:11:24 +00:00
2021-05-24 15:47:55 +00:00
automation :
- alias : YouTube Notification - SlackerLabs
id : 5e751352 -067e-4706 -978a-2479b6f5fd96
trigger :
- platform : state
entity_id : sensor.slackerlabs
2020-12-03 05:11:24 +00:00
2021-05-24 15:47:55 +00:00
condition :
- condition : template
2021-08-04 19:57:44 +00:00
value_template : "{{ trigger.from_state.attributes.url != trigger.to_state.attributes.url }}"
2020-12-03 05:11:24 +00:00
2021-05-24 15:47:55 +00:00
action :
- service : script.text_notify
data_template :
who : "jeff"
2021-08-04 19:57:44 +00:00
message : Your Video is now Live {{ states('sensor.slackerlabs') }} - {{ state_attr('sensor.slackerlabs','url') }}
2021-06-17 01:08:29 +00:00
- repeat :
count : 1
sequence :
- delay : '00:03:00'
2020-12-03 05:11:24 +00:00
2021-08-04 19:57:44 +00:00
- service : script.twitter_notify_image
2021-06-17 01:08:29 +00:00
data :
tweet : >
{{ [
2021-08-04 19:57:44 +00:00
"Brand New SlackerLabs Video! {{ states('sensor.slackerlabs') }} - {{ state_attr('sensor.slackerlabs','url') }} #homeassistant #homeautomation #smarthome " ,
"New SlackerLabs Video went Live! {{ states('sensor.slackerlabs') }} - {{ state_attr('sensor.slackerlabs','url') }} #homeassistant #homeautomation #smarthome " ,
"Boom! New SlackerLabs Video! {{ states('sensor.slackerlabs') }} - {{ state_attr('sensor.slackerlabs','url') }} #homeassistant #homeautomation #smarthome " ,
"Its time for a New SlackerLabs Video! {{ states('sensor.slackerlabs') }} - {{ state_attr('sensor.slackerlabs','url') }} #homeassistant #homeautomation #smarthome " ,
"Today is SlackerLabs Video Release Day! {{ states('sensor.slackerlabs') }} - {{ state_attr('sensor.slackerlabs','url') }} #homeassistant #homeautomation #smarthome "
2021-06-17 01:08:29 +00:00
] | random }}
who : 'thejeffreystone'
2021-08-04 19:57:44 +00:00
image : >
{{ state_attr('sensor.slackerlabs', 'entity_picture') }}
2021-06-17 01:08:29 +00:00
- delay : '00:10:00'
2021-08-04 19:57:44 +00:00
- service : script.twitter_notify_image
2021-06-17 01:08:29 +00:00
data :
tweet : >
{{ [
2021-08-04 19:57:44 +00:00
"Brand New SlackerLabs Video! {{ states('sensor.slackerlabs') }} - {{ state_attr('sensor.slackerlabs','url') }} #homeassistant #homeautomation #smarthome " ,
"New SlackerLabs Video went Live! {{ states('sensor.slackerlabs') }} - {{ state_attr('sensor.slackerlabs','url') }} #homeassistant #homeautomation #smarthome " ,
"Boom! New SlackerLabs Video! {{ states('sensor.slackerlabs') }} - {{ state_attr('sensor.slackerlabs','url') }} #homeassistant #homeautomation #smarthome " ,
"Its time for a New SlackerLabs Video! {{ states('sensor.slackerlabs') }} - {{ state_attr('sensor.slackerlabs','url') }} #homeassistant #homeautomation #smarthome " ,
"Today is SlackerLabs Video Release Day! {{ states('sensor.slackerlabs') }} - {{ state_attr('sensor.slackerlabs','url') }} #homeassistant #homeautomation #smarthome "
2021-06-17 01:08:29 +00:00
] | random }}
who : 'slackerlabs'
2021-08-04 19:57:44 +00:00
image : >
{{ state_attr('sensor.slackerlabs', 'entity_picture') }}
2021-06-17 01:08:29 +00:00
- delay : '12:30:00'