diff --git a/config/.HA_VERSION b/config/.HA_VERSION index 0b6b6ca0..4d9a6c51 100755 --- a/config/.HA_VERSION +++ b/config/.HA_VERSION @@ -1 +1 @@ -0.96.2 \ No newline at end of file +0.96.5 \ No newline at end of file diff --git a/config/packages/twitter.yaml b/config/packages/twitter.yaml index e4000539..2cc916d0 100755 --- a/config/packages/twitter.yaml +++ b/config/packages/twitter.yaml @@ -328,9 +328,33 @@ automation: "internet", "internet", "stocks", "stocks", "night", - "tv", "tv", + "tv", "tv", "throwback", "promo", "promo", "joke" ] %} {{ pick|random }} + + - alias: 'Random YouTube Videos' + hide_entity: True + trigger: + - platform: time_pattern + hours: '/2' + minutes: 45 + condition: + - condition: template + value_template: > + {%- if states.automation.random_youtube_videos.attributes.last_triggered -%} + {{ (as_timestamp(now()) - as_timestamp(states.automation.random_house_stats.attributes.last_triggered)) > 10000 }} + {%- else -%} + true + {%- endif -%} + action: + - delay: '0{{ range(0,2) | random | int }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}' + - service: script.tweet_youtube_engine_setup + data_template: + pick: >- + {% set pick = [ + "S01E01", "S01E02","S01E03", "S01E04","S01E05", "S01E06","S01E07", "S01E08","S01E09", "S01E10", + ] %} + {{ pick|random }} diff --git a/config/script/tweet.yaml b/config/script/tweet.yaml index c092a1ec..7b685b05 100755 --- a/config/script/tweet.yaml +++ b/config/script/tweet.yaml @@ -21,7 +21,7 @@ tweet_engine_setup: "If you are not subscribed to our YouTube channel, 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 inpiring video. (https://www.youtube.com/watch?v=5rsdwJZ0SLY&feature=youtu.be&t=85) #GoCreate #nosmallcreator ", - "Quick YouTube cameo on #HomeKit #Geeks channel. Check it ou! (https://youtu.be/3tutxHO0J78?t=872) " + "Quick YouTube cameo on #HomeKit #Geeks channel. Check it out! (https://youtu.be/3tutxHO0J78?t=872) " ], "solar": [ "I am keeping track of the current #Tesla stock price. It is ${{ states('sensor.tesla')|round }}. #Solar", @@ -135,7 +135,7 @@ tweet_engine_setup: "Knock, knock. Whos there? very long pause...Java.", "I know the value of NULL, and can sort by it too.", "There are only two kinds of #IOT devices. The latest model and the obsolete one.", - "Bear Stone does not use the GUI, he prefers the command line.", + "Bear Stone does not use the GUI, it prefers the COMMAND line.", "Bear Stone can install 64 bit OSes on 32 bit machines.", "No statement can catch the BearStoneException.", "Bear Stone can access the internet from the appliances in its kitchen.", diff --git a/config/script/tweet_youtube.yaml b/config/script/tweet_youtube.yaml new file mode 100755 index 00000000..18c29fc3 --- /dev/null +++ b/config/script/tweet_youtube.yaml @@ -0,0 +1,83 @@ +tweet_youtube_engine_setup: + sequence: + - service: script.tweet_engine_image + data_template: + tweet: >- + {%- macro tweet(topic) -%} + {% set tweets = { + "S01E01": [ + "Tesla Solar Panels vs Hurricane IRMA! (https://www.vcloudinfo.com/2018/09/re-installing-tesla-solar-panels-again.html)" + ], + "S01E02": [ + "How to Port Forward SageCom 5260 Fast Routers (https://www.vcloudinfo.com/2018/09/setting-up-port-forwarding-on-sagemcom.html)" + ], + "S01E03": [ + "Please stop saying Alexa in your Videos! (https://www.vcloudinfo.com/2018/09/please-stop-saying-alexa-in-your.html)" + ], + "S01E04": [ + "Unboxing and setup of the Philips Hue Calla Landscape Lights (https://www.vcloudinfo.com/2018/09/unboxing-philips-hue-calla-landscape.html)" + ], + "S01E05": [ + "Upgrading Home Assistant in Docker (https://www.vcloudinfo.com/2018/10/upgrading-home-assistant-in-docker.html)" + ], + "S01E06": [ + "Adding Hue Lights to my Smart Home (https://www.vcloudinfo.com/2018/10/adding-smart-light-to-my-smart-house.html)" + ], + "S01E07": [ + "Lights, Camera, Automation! Hue light setup Part 2. (https://www.vcloudinfo.com/2018/10/lights-camera-automation-hue-light.html)" + ], + "S01E08": [ + "How to enable Alexa Whisper Mode and Hunches! (https://www.vcloudinfo.com/2018/10/how-to-enable-alexa-whisper-mode-and.html)" + ], + "S01E09": [ + "Siri Store and Retrieve shortcuts for ANY information! (https://www.vcloudinfo.com/2018/10/siri-store-and-retrieve-shortcuts-for.html)" + ], + "S01E10": [ + "Easy Smart Home Gadgets I use for my Holiday Lighting setup! (https://www.vcloudinfo.com/2018/10/easy-smart-home-gadgets-i-use-for-my.html)" + ] + } %} + + {{ tweets[topic]|random }} + {%- endmacro -%} + + {{ tweet(pick) }} + + image: >- + {%- macro image(topic) -%} + {% set images = { + "S01E10": [ + "/config/www/custom_ui/floorplan/images/branding/episodes/S01E10.png" + ], + "S01E09": [ + "/config/www/custom_ui/floorplan/images/branding/episodes/S01E09.png" + ], + "S01E08": [ + "/config/www/custom_ui/floorplan/images/branding/episodes/S01E08.png" + ], + "S01E07": [ + "/config/www/custom_ui/floorplan/images/branding/episodes/S01E07.png" + ], + "S01E06": [ + "/config/www/custom_ui/floorplan/images/branding/episodes/S01E06.png" + ], + "S01E01": [ + "/config/www/custom_ui/floorplan/images/branding/episodes/S01E01.png" + ], + "S01E02": [ + "/config/www/custom_ui/floorplan/images/branding/episodes/S01E02.png" + ], + "S01E03": [ + "/config/www/custom_ui/floorplan/images/branding/episodes/S01E03.png" + ], + "S01E04": [ + "/config/www/custom_ui/floorplan/images/branding/episodes/S01E04.png" + ], + "S01E05": [ + "/config/www/custom_ui/floorplan/images/branding/episodes/S01E05.png" + ] + } %} + + {{ images[topic]|random }} + {%- endmacro -%} + + {{ image(pick) }} diff --git a/config/www/custom_ui/floorplan/images/branding/solar_readings.png b/config/www/custom_ui/floorplan/images/branding/solar_readings.png index a86f1137..7eb41bf3 100644 Binary files a/config/www/custom_ui/floorplan/images/branding/solar_readings.png and b/config/www/custom_ui/floorplan/images/branding/solar_readings.png differ diff --git a/config/www/custom_ui/floorplan/images/youtube/episodes/S01E01.png b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E01.png new file mode 100755 index 00000000..041f80df Binary files /dev/null and b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E01.png differ diff --git a/config/www/custom_ui/floorplan/images/youtube/episodes/S01E02.png b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E02.png new file mode 100755 index 00000000..2b047c46 Binary files /dev/null and b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E02.png differ diff --git a/config/www/custom_ui/floorplan/images/youtube/episodes/S01E03.png b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E03.png new file mode 100755 index 00000000..2d1ae0b1 Binary files /dev/null and b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E03.png differ diff --git a/config/www/custom_ui/floorplan/images/youtube/episodes/S01E04.png b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E04.png new file mode 100755 index 00000000..bab3bbad Binary files /dev/null and b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E04.png differ diff --git a/config/www/custom_ui/floorplan/images/youtube/episodes/S01E05.png b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E05.png new file mode 100755 index 00000000..7f154f14 Binary files /dev/null and b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E05.png differ diff --git a/config/www/custom_ui/floorplan/images/youtube/episodes/S01E06.png b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E06.png new file mode 100755 index 00000000..3fba5070 Binary files /dev/null and b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E06.png differ diff --git a/config/www/custom_ui/floorplan/images/youtube/episodes/S01E07.png b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E07.png new file mode 100755 index 00000000..6e979b83 Binary files /dev/null and b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E07.png differ diff --git a/config/www/custom_ui/floorplan/images/youtube/episodes/S01E08.png b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E08.png new file mode 100755 index 00000000..795fd617 Binary files /dev/null and b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E08.png differ diff --git a/config/www/custom_ui/floorplan/images/youtube/episodes/S01E09.png b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E09.png new file mode 100755 index 00000000..5841a91e Binary files /dev/null and b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E09.png differ diff --git a/config/www/custom_ui/floorplan/images/youtube/episodes/S01E10.png b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E10.png new file mode 100755 index 00000000..7da8cb48 Binary files /dev/null and b/config/www/custom_ui/floorplan/images/youtube/episodes/S01E10.png differ