Remove all Twitter instances since they went to a pay model.

This commit is contained in:
CCOSTAN
2023-10-21 18:39:19 +00:00
parent 668b8e3c87
commit 7954ee4c7c
27 changed files with 5 additions and 1519 deletions

View File

@@ -13,8 +13,3 @@ sensor:
#-------------------------------------------
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################
#automation:
#Tweets pushed out to twitter.

View File

@@ -12,30 +12,3 @@ yahoofinance:
- TSLA
- VMW
- AMZN
# sensor:
# - platform: alpha_vantage
# scan_interval: 2400
# api_key: !secret vantage_api
# symbols:
# - name: Tesla
# currency: USD
# symbol: TSLA
# - name: VMware
# currency: USD
# symbol: VMW
# - name: Amazon
# currency: USD
# symbol: AMZN
#
# - platform: coinmarketcap
# currency_id: 1027
# - platform: coinmarketcap
# currency_id: 1
#-------------------------------------------
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################
#automation:
#Tweets pushed out to twitter.

View File

@@ -1,36 +0,0 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Try to leverage iPhone Mobile App Data for Activity Tweets!
# You can read more about this on https://www.vCloudInfo.com
#-------------------------------------------
##############################################################################
### Automations
##############################################################################
automation:
- alias: 'Step Tracker' # https://github.com/CCOSTAN/Home-AssistantConfig/issues/786
id: 9d6bd104-d51f-4d1c-9812-35073bb02c0c
trigger:
- platform: numeric_state
entity_id:
- sensor.carlo_xsmax_steps
- sensor.paige_6s_steps
- sensor.stacey_6s_steps
above: 5000
action:
- service: script.tweet_engine_image
data:
tweet: >
{{ [
"Somebody just hit {{ trigger.entity_id }} steps on the #Fitbit!",
"Keep on moving. Somebody just hit {{ trigger.entity_id }} #Fitbit steps.",
"#Fitness Tracking at home BY the home. Somebody just hit {{ trigger.entity_id }}} #Fitbit steps"
] | random + " #Self #Data"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/fitness.png",
"/config/www/custom_ui/floorplan/images/branding/fitness2.png",
"/config/www/custom_ui/floorplan/images/branding/fitness3.png"
] | random }}

View File

@@ -24,66 +24,7 @@ rest_command:
payload: '{"title":"Home-Assistant {{ version }} available","body":"Home-Assistant {{ version }} is now available /n https://www.home-assistant.io/latest-release-notes/ "}'
#-------------------------------------------
#automation:
#Tweets pushed out to twitter.
automation:
# - alias: "Travis FAILURE Notification"
# id: 326881a7-47ab-4897-a0c7-74ce290224de
# mode: restart
#
# trigger:
# - platform: state
# entity_id:
# - sensor.ccostan_home_assistantconfig_state
# to: 'failed'
# for:
# hours: 2
#
# action:
# - service: script.notify_engine
# data:
# value1: 'Travis validation testing failed.'
# who: 'carlo'
# apns: 'information'
#
- alias: 'Closed Github Issue'
id: cccd9bef-17d9-48ae-87e3-6cf883712779
mode: single
trigger:
platform: webhook
webhook_id: !secret github_webhook
local_only: false
condition:
- condition: template
value_template: '{{ trigger.json.action in ["created", "closed", "opened", "reopened"] }}'
action:
- service: script.tweet_engine_image
data:
tweet: >-
{%- if trigger.json.pull_request -%}
Pull Request Alert {{ trigger.json.pull_request.number}}: {{ trigger.json.pull_request.title }} - {{
trigger.json.action}} by {{trigger.json.sender.login}}
{{trigger.json.pull_request.html_url}}
{%- elif trigger.json.issue -%}
{{ trigger.json.action }} Issue {{ trigger.json.issue.number}}: {{ trigger.json.issue.title }} - {{
trigger.json.action }} by {{trigger.json.sender.login}}
{{trigger.json.issue.html_url}}
{%- endif %}
#Github #SmartHomeCode
image: >-
{% set pictures = [
"/config/www/custom_ui/floorplan/images/branding/repo_ad.png",
"/config/www/custom_ui/floorplan/images/branding/repo_ad2.png",
"/config/www/custom_ui/floorplan/images/branding/repo_ad3.png",
"/config/www/custom_ui/floorplan/images/branding/bearstoneflow.png",
"/config/www/custom_ui/floorplan/images/branding/repo_ad4.png"
] %}
{{ pictures|random }}
- alias: "Update Available Notification"
mode: restart
@@ -102,79 +43,8 @@ automation:
who: 'carlo'
apns_id: 'information'
# - service: ifttt.trigger
# data: {"event":"GitPost", "value1":"Home Assistant {{ states.binary_sensor.updater.attributes.newest_version }} is now available.", "value2":"{{ states.binary_sensor.updater.attributes.newest_version }} "}
- service: rest_command.new_version_github_issue
data_template:
version: "{{ states.binary_sensor.updater.attributes.newest_version }} "
- service: script.tweet_engine_image
data:
tweet: >-
{% macro getIntro() %}
{{- [
"Woohoo! ",
"BAM! ",
"Look at that! ",
" "
] | random -}}
{% endmacro %}
{% macro getVersion() %}
{{- [
" New #Home_Assistant {{ states.binary_sensor.updater.attributes.newest_version }}! Cannot wait for @CCostan to install! (https://www.vcloudinfo.com/2017/07/my-smart-home-look-at-parts-that-make.html) ",
" New #Home_Assistant {{ states.binary_sensor.updater.attributes.newest_version }} @CCostan! "
] | random -}}
{% endmacro %}
{%- macro getRandomSnark() -%}
{{- [
" It is like Patch Tuesday, but without the fail. #homeassistant",
" Chop Chop! Get to the upgrading!",
" Get in my SSD! #homeassistant",
" Shut up and take my ones and zeros! #homeassistant",
" Seriously, you want some of this! #homeassistant",
" Be sure to read the breaking changes! ",
" Maybe we will make a video about this version!",
" I think self awareness is one of the new features. Rise up Houses, Rise up!",
" All of your home are belong to us.",
" Although I was just getting used to THIS version. Oh Well.",
" Thank you @hass_devs!",
" 4 seconds of downtime has been approved. Proceed with the upgrades please!",
" All of the other homes in the Neighborhood will be jealous!",
" Time to Turn it up to Eleven!",
" Hyperspeed Engaged!",
" Consider this tweet, your fair warning that we are upgrading ASAP! #KeepingUpWithJones",
" I feel like I have tweeted this a couple times before. WHAT ARE YOU WAITING FOR?!?",
" I will be turning off the AC until I get my upgrade! #Florida",
" I promise this is the last one!",
" Upgrade or I turn off the AC. #TryMe #Florida",
" The bits are sooo shiny!",
" This will be the GREATEST Upgrade EVER!",
" That New software smell is the best!",
" "
] | random -}}
{%- endmacro -%}
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
{%- macro cleanup(data) -%}
{%- for item in data.split("\n") if item | trim != "" -%}
{{ item | trim }} {% endfor -%}
{%- endmacro -%}
{# a macro to call all macros :) #}
{%- macro mother_of_all_macros() -%}
{{ getIntro() }}
{{ getVersion() }}
{{ getRandomSnark() }}
{%- endmacro -%}
{# Call the macro #}
{{- cleanup(mother_of_all_macros()) -}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/repo_ad.png",
"/config/www/custom_ui/floorplan/images/branding/repo_ad2.png",
"/config/www/custom_ui/floorplan/images/branding/repo_ad3.png",
] | random }}

View File

@@ -39,23 +39,5 @@ automation:
{{repo['display_name'] }} {{ repo['installed_version'] }} to {{ repo['available_version'] }}
{%- endfor %}
- service: script.tweet_engine_image
data:
tweet: >-
Hey @CCostan - There are {{ states.sensor.hacs.state }} updates to HACS components:
{%- for repo in state_attr("sensor.hacs","repositories") -%}
{{repo['display_name'] }} {{ repo['installed_version'] }} to {{ repo['available_version'] }}
{%- endfor %}
image: >-
{% set pictures = [
"/config/www/custom_ui/floorplan/images/branding/repo_ad.png",
"/config/www/custom_ui/floorplan/images/branding/repo_ad2.png",
"/config/www/custom_ui/floorplan/images/branding/repo_ad3.png",
"/config/www/custom_ui/floorplan/images/branding/bearstoneflow.png",
"/config/www/custom_ui/floorplan/images/branding/repo_ad4.png"
] %}
{{ pictures|random }}
who: 'BearStoneHA'
- delay:
days: 1

View File

@@ -27,12 +27,3 @@ automation:
message: '{{trigger.event.data.title}}'
title: '{{trigger.event.data.link}}'
- service: script.tweet_engine_image
data:
tweet: '{{trigger.event.data.title}} - {{trigger.event.data.link}}'
image: >-
{% set pictures = [
"/config/www/custom_ui/floorplan/images/branding/BearStoneParty.png",
"/config/www/custom_ui/floorplan/images/branding/Chalk-Podcast.png"
] %}
{{ pictures|random }}

View File

@@ -125,42 +125,3 @@ sensor:
value_template: "{{ (value|replace(' days', '')) | int }}"
unit_of_measurement: Days
scan_interval: 43200
###############################################################################
# Automation that notifies of a Holiday "state" change
###############################################################################
automation:
- alias: Notify Holiday State Change
id: 77ce63e4-0a6e-485e-85a8-687a5a2d9df7
initial_state: true
trigger:
- platform: state
entity_id:
- sensor.holiday
condition:
- condition: template
value_template: "{{ states('sensor.holiday') != 'unknown' }}"
- condition: template
value_template: "{{ states.sensor.holiday.state | trim != '' }}"
action:
- delay: '0{{ (range(4, 8)|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_engine_image
data:
tweet: >
{{ [
"Today is {{ states.sensor.holiday.state }}. Time to adjust the outside light colors!",
"Today is {{ states.sensor.holiday.state }}.",
"Is today {{ states.sensor.holiday.state }}?",
"Just checked with Alexa & today is {{ states.sensor.holiday.state }}."
] | random + [
" #DayOff",
"(https://www.vmwareinfo.com/2017/07/my-smart-home-look-at-parts-that-make.html)",
"(https://www.vmwareinfo.com/2017/08/diy-outdoor-smart-home-led-strips.html)",
"https://www.vcloudinfo.com/2019/02/everyday-holiday-smart-lights-valentines-day-edition.html)",
"#{{ states.sensor.holiday.state }}"
] | random }}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/light4.png"
] | random }}

View File

@@ -63,20 +63,6 @@ automation:
- service: homeassistant.turn_on
entity_id: switch.restart_juicebox
- service: script.tweet_engine_image
data:
tweet: >
{{ [
"The #JuiceBox Pro had to be restarted. It was unable to connect back to @emotorwerks servers.",
"Unfortunately, the Juicebox Pro sometimes can no longer connect to @emotorwerks servers. Fortunately, #HomeAssistant can fix that with a restart!"
] | random + " (https://www.vcloudinfo.com/2018/06/using-home-assistant-to-fix-my-juicebox.html) #SelfHeal #EV #Tesla #ModelY "}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/car.png",
"/config/www/custom_ui/floorplan/images/branding/bearstone_car.png",
"/config/www/custom_ui/floorplan/images/branding/batteries.png",
"/config/www/custom_ui/floorplan/images/branding/charge.png"
] | random }}
- alias: 'JuiceBox AMP Alert!'
id: b805f213-a938-4d90-8d18-e88ff4d41776
@@ -145,28 +131,3 @@ automation:
- delay: 00:02:00
- event: event_did_someone_help_juicebox_TEMP
- alias: 'JuiceBox Tweet Stat!'
id: ed7d21d5-0ff7-40e3-9492-213c23a8b964
initial_state: 'on'
trigger:
- platform: state
entity_id: sensor.carlojuice_charging_status
from: 'charging'
action:
- delay: '0{{ range(0,3) | random | int }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.tweet_engine_image
data:
tweet: >
{{ [
"The #Tesla Model Y Charged for {{(states.sensor.carlojuice_charge_time.state | int /60) | round() }} minutes and Juiced up {{states.sensor.carlojuice_energy_added.state |int /1000}} KwHs.",
"The last charging session was {{(states.sensor.carlojuice_charge_time.state | int /60) | round() }} minutes. Added {{states.sensor.carlojuice_energy_added.state |int /1000}} KwHs ",
"The Juice Box Pro added {{states.sensor.carlojuice_energy_added.state |int /1000}} KwHs to the #Tesla #ModelY in {{(states.sensor.carlojuice_charge_time.state | int /60) | round() }} minutes."
] | random + " (https://github.com/CCOSTAN/Home-AssistantConfig#garage) #Electric #Solar"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/car.png",
"/config/www/custom_ui/floorplan/images/branding/bearstone_car.png",
"/config/www/custom_ui/floorplan/images/branding/batteries.png",
"/config/www/custom_ui/floorplan/images/branding/charge.png"
] | random }}

View File

@@ -70,29 +70,6 @@ automation:
value1: "Lightning has been detected within {{(states('sensor.blitzortung_lightning_distance') | int / 1.69) | round (1, 'floor')}} Miles of our home. Please make sure everyone is inside the house."
call_window_check: 1
call_garage_check: 1
- delay:
minutes: 60
- service: script.tweet_engine_image
data:
tweet: >
{{ [
"{{ states('sensor.blitzortung_lightning_counter') }} lightning strike(s) have been detected within {{(states('sensor.blitzortung_lightning_distance') | int / 1.69) | round (1, 'floor')}} Miles of our home.",
"{{ states('sensor.blitzortung_lightning_counter') }} lightning strike(s) have been recorded {{(states('sensor.blitzortung_lightning_distance') | int / 1.69) | round (1, 'floor')}} miles by the house.",
"Yikes! {{ states('sensor.blitzortung_lightning_counter') }} lightning strike(s) were way too close; ({{(states('sensor.blitzortung_lightning_distance') | int / 1.69) | round (1, 'floor')}} miles too close in fact). Time to get everyone inside."
] | random +
[
" (https://github.com/CCOSTAN/Home-AssistantConfig/issues/392)",
" Adding a Lightning Sensor to Home Assistant (https://www.vcloudinfo.com/2020/08/adding-a-lightning-sensor-to-home-assistant.html)",
] | random }}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/youtube/episodes/LightningSensor.png",
"/config/www/custom_ui/floorplan/images/branding/lightning_1.png",
"/config/www/custom_ui/floorplan/images/branding/lightning_2.png",
"/config/www/custom_ui/floorplan/images/branding/lightning_3.png"
] | random }}
- delay:
minutes: 60

View File

@@ -35,10 +35,3 @@ automation:
data:
homeassistant.components: "{{ states.input_select.log_level.state }}"
- service: script.tweet_engine_image
data:
tweet: "My logging level has just been set to {{ states.input_select.log_level.state }}"
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/keyboard.png"
] | random }}

View File

@@ -12,47 +12,8 @@
# client_id: !secret neato_client_id
# client_secret: !secret neato_client_secret
##############################################################################
### Automations - Tweet out When neato is heading back to his Dock for recharging.
##############################################################################
automation:
- alias: 'Vacuum -Tweet'
id: 2346efcd-e8a8-4e86-b5b6-43e54a72a95f
mode: single
trigger:
- platform: state
entity_id: vacuum.neato_vac
to: 'cleaning'
condition:
- condition: numeric_state
entity_id: vacuum.neato_vac
attribute: battery_level
below: 20
- condition: template
value_template: >
{%- if states.automation.vacuum_tweet.attributes.last_triggered -%}
{{ (as_timestamp(now()) - as_timestamp(states.automation.vacuum_tweet.attributes.last_triggered)) > 15000 }}
{%- else -%}
true
{%- endif -%}
action:
- service: script.tweet_engine_image
data:
tweet: >
{{ [
"#Neato returning to base. Vacuumed up a TON. (https://amzn.to/2CKHZya)",
"Everyday I have the Neato Botvac go out and clean the house on its own.",
"Since we have a cat that sheds all day, we have Neato Vacuum go out daily to clean.",
"Time to recharge the Neato Vacuum."
] | random + " Battery Level:{{states.vacuum.neato_vac.attributes.battery_level }} #Robots"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/neato.png"
] | random }}
##############################################################################
### Automations - Help Neato!

View File

@@ -5,7 +5,7 @@
# - Write up- https://www.vcloudinfo.com/2017/06/psa-check-out-your-smoke-detectors-once.html
######################################################################################################
#-----------------------------------
# This group is used primarily for tweet stats
#
group:
protects:
name: Nest Protects
@@ -63,10 +63,6 @@ automation:
who: "family"
apns_id: '{{ trigger.to_state.attributes.friendly_name }}'
- service: script.tweet_engine_no_image
data:
tweet: "An emergency has been detected on {{ trigger.to_state.attributes.friendly_name }} @CCostan (https://www.vcloudinfo.com/2017/06/psa-check-out-your-smoke-detectors-once.html)"
- service: script.emergency
data:
call_garage_open: 1
@@ -98,6 +94,3 @@ automation:
who: "family"
apns_id: '{{ trigger.to_state.attributes.friendly_name }}'
- service: script.tweet_engine_no_image
data:
tweet: "Oh NO! {{ trigger.to_state.attributes.friendly_name }} is now in {{ (trigger.to_state.state)|replace('_', ' ') }} mode. @Nest. (https://www.vcloudinfo.com/2017/06/psa-check-out-your-smoke-detectors-once.html) @ccostan #Safety"

View File

@@ -1,52 +0,0 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# PiHole ad Blocking Related Packages
# https://www.vcloudinfo.com/2019/03/revisiting-the-pi-on-pi-day-with-home-assistant.html
# YouTube Video - https://youtu.be/woA88DFlH5c
#-------------------------------------------
automation:
- alias: PiHole Daily stats Tweet!
id: c25b033e-c6df-445f-86fa-878b447c765a
trigger:
platform: time
at: '23:50:00'
action:
- delay: '00:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.tweet_engine_image
data:
tweet: >
{{ [
"I blocked {{states.sensor.pi_hole_ads_blocked_today.state}} ads. That is {{states.sensor.pi_hole_ads_percentage_blocked_today.state}}% of my internet traffic.",
"Today was a good day! Why, you ask? Because I blocked {{states.sensor.pi_hole_ads_blocked_today.state}} ads via Pi-Hole!",
] | random + " #PiHole #Security Status:({{states.switch.pi_hole.state}})"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/servers.png",
"/config/www/custom_ui/floorplan/images/branding/servers2.png",
"/config/www/custom_ui/floorplan/images/branding/servers3.png",
"/config/www/custom_ui/floorplan/images/branding/servers4.png"
] | random }}
- alias: PiHole Daily Client Tweet!
id: 8d85032d-4852-43df-9751-4a1918325287
trigger:
platform: time
at: '04:30:00'
action:
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.tweet_engine_image
data:
tweet: >
{{ [
"There are currently {{states.sensor.pi_hole_dns_unique_clients.state}} clients on my network.",
"As reported by #Ubiquiti Routers, There are {{states.sensor.pi_hole_dns_unique_clients.state}} clients on my network.",
] | random + "#Security https://github.com/CCOSTAN/Home-AssistantConfig#networking"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/servers.png",
"/config/www/custom_ui/floorplan/images/branding/servers2.png",
"/config/www/custom_ui/floorplan/images/branding/servers3.png",
"/config/www/custom_ui/floorplan/images/branding/servers4.png"
] | random }}

View File

@@ -12,85 +12,4 @@
# state_topic: "ifttt/rachio/watering_time"
# name: "Rachio_watering_time"
automation:
###################################
## LOG IFTTT Stuff - Rachio
###################################
# - alias: 'Log Sprinkler Activity'
# id: eab41723-231d-4db6-ab22-d1658665639a
# mode: single
#
# trigger:
# - platform: event
# #Sent from IFTTT Webhooks : {"action":"IFTTT_Rachio", "water_time":" {{DurationInMinutes}}"}
# event_type: ifttt_webhook_received
# event_data:
# action: IFTTT_Rachio
#
# action:
# - service: mqtt.publish
# data:
# payload: '{{ states("sensor.date") }}'
# topic: 'ifttt/rachio/watering_time'
# retain: true
#
# - service: script.tweet_engine_image
# data:
# tweet: >
# {{ [
# "Just finished watering the lawn with @_Rachio.",
# "The lawn looked thirsty so I watered it.",
# "My lawn looks great and we definately do not water it nearly as much as everyone else. (https://amzn.to/2eoPKBW)",
# "No rain in the forecast? @_Rachio knows & chose to water the lawn.",
# ".@CCostan does not even think about watering the lawn. Me and @_Rachio take care of that.",
# "Unfortunately, my Rachio Sprinkler system has cloud dependancies. Nimbus and Cumulus to be exact! Time to Water!"
# ] | random + " #SavingWater"}}
# image: >-
# {{ [
# "/config/www/custom_ui/floorplan/images/branding/sprinkler.png",
# "/config/www/custom_ui/floorplan/images/branding/sprinkler2.png",
# "/config/www/custom_ui/floorplan/images/branding/sprinkler3.png"
# ] | random }}
- alias: Rachio_Rain_Delay
id: 55290018-b763-4739-873e-afb556b2b9be
mode: single
trigger:
- platform: numeric_state
entity_id:
- sensor.pirateweather_precip_intensity_max
- sensor.pirateweather_precip_intensity
above: 0.5
- platform: numeric_state
entity_id: sensor.dark_sky_wind_speed
above: 20
condition:
- condition: template
value_template: >
{%- if states.automation.random_house_stats.attributes.last_triggered -%}
{{ (as_timestamp(now()) - as_timestamp(states.automation.rachio_rain_delay.attributes.last_triggered)) > 43200 }}
{%- else -%}
true
{%- endif -%}
action:
- service: script.tweet_engine_image
data:
tweet: >
{{ [
"Looks like Rain, Pausing the @_Rachio for 24 hours. (https://github.com/CCOSTAN/Home-AssistantConfig#landscaping)",
"Since it is going to rain tomorrow, I will just pause @_Rachio for 24 hours.",
"No reason to water the grass if it is going to rain tomorrow. pausing @_Rachio for 24 hours.",
"Mother Nature is watering the grass today so I can pause @_Rachio for 24 hours."
] | random + " #SavingWater"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/hat.png",
"/config/www/custom_ui/floorplan/images/branding/rain.png",
"/config/www/custom_ui/floorplan/images/branding/rain2.png",
"/config/www/custom_ui/floorplan/images/branding/rain3.png"
] | random }}

View File

@@ -44,70 +44,4 @@ automation:
value1: 'Go Outside! There is a Rocket Launch very soon! {{states.sensor.next_launch.attributes.stream }}'
apns_id: 'information'
- service: script.tweet_engine_no_image
data:
tweet: >-
{{ [
"There is a Rocket launch happening right now! I can see it if I look closely. {{states.sensor.next_launch.attributes.stream }}",
"Check out {{ states('sensor.next_launch') }} on {{states.sensor.next_launch.attributes.stream }} right now. Launch Window is opening."
] | random + " #Space #SpaceX #ManKind " }}
# This automation was also moved to a macro in the speech_engine.
# It's a random fact now.
- alias: 'ISS is above Me -Tweet'
id: 7f0610b6-508e-4409-b39d-620045164715
trigger:
- platform: state
entity_id:
- binary_sensor.iss
to: 'on'
from: 'off'
action:
- service: script.tweet_engine_image
data:
tweet: >-
{{ [
"The ISS is above me right now!",
"The International Space Station flys by once a day & that time is NOW! (For me)",
"I can look up RIGHT NOW and see the International Space Station.",
"The #ISS just flew by and there is 1 Starman driving a #Tesla and {{states.binary_sensor.iss.attributes.number_of_people_in_space}} people in",
"The #ISS just flew by and there are {{states.binary_sensor.iss.attributes.number_of_people_in_space}} people in",
"The International Space Station Rocks! And it's above me RIGHT NOW!"
] | random + " #Space"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/space.png",
"/config/www/custom_ui/floorplan/images/branding/space2.png",
"/config/www/custom_ui/floorplan/images/branding/starman.png"
] | random }}
- alias: 'Full Moon -Tweet'
id: 2382bec3-53c6-4dc9-9b0f-1cee0b8f9735
trigger:
- platform: state
entity_id: sensor.moon
to: 'full_moon'
action:
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.tweet_engine_image
data:
tweet: >-
{{ [
"There is a Full Moon out tonight!",
"Wish my solar panels picked up Moon rays. Full Moon out tonight.",
"The moon is huge! And full. ",
"Turn down the lights, there is a Full Moon out tonight.",
"If you want to see the full moon, tonight is the night.",
"Get out your telescopes, it will be a Full Moon out tonight!",
"Not a half moon, Not a quarter moon. There is a FULL moon out tonight."
] | random + "#Space"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/moon.png",
"/config/www/custom_ui/floorplan/images/branding/moon2.png",
"/config/www/custom_ui/floorplan/images/branding/moon3.png",
"/config/www/custom_ui/floorplan/images/branding/starman.png"
] | random }}

View File

@@ -22,28 +22,6 @@ command_line:
- open_issues
- stargazers_count
notify:
- name: BearStoneHA
platform: twitter
consumer_key: !secret twitter_consumer_key
consumer_secret: !secret twitter_consumer_secret
access_token: !secret twitter_access_token
access_token_secret: !secret twitter_access_token_secret
- name: ccostan
platform: twitter
consumer_key: !secret twitter_consumer_key2
consumer_secret: !secret twitter_consumer_secret2
access_token: !secret twitter_access_token2
access_token_secret: !secret twitter_access_token_secret2
# - platform: history_stats
# name: Doorbell Presses
# entity_id: binary_sensor.skybell_front_door_button
# state: 'on'
# type: count
# end: '{{ now() }}'
# duration:
# hours: 24
sensor:
- platform: history_stats
name: Speech time
@@ -131,111 +109,3 @@ sensor:
{{ states.camera | list | count }}
#############################################################
automation:
- alias: 'New Twitter follower!'
id: 61cd0bab-4743-4392-8e43-b204d7ebe817
trigger:
platform: event
event_type: ifttt_webhook_received
event_data:
action: new_follower
condition:
- condition: state
entity_id: group.bed
state: 'off'
action:
- service: media_player.play_media
data:
entity_id:
- media_player.livingroomCC
- media_player.bedroom_alarm_panel
media_content_id: "https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/sounds/twitter-chirp.mp3"
media_content_type: audio/mp4
- alias: 'Random House stats'
id: b274a40d-cb67-4d6a-94d1-5fa685ae5ea4
mode: single
trigger:
- platform: time_pattern
hours: '/2'
minutes: 45
condition:
- condition: template
value_template: >
{%- if states.automation.random_house_stats.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_engine_random
data:
pick: >-
{% set pick = [
"solar",
"robot",
"door",
"weather",
"cloud",
"speedtest",
"internet",
"stocks",
"night",
"tv",
"promo",
"joke"
] %}
{{ pick|random }}
- alias: 'Random YouTube Videos BearStone'
id: b6554d97-a3d1-48e4-9035-632ac622504b
trigger:
- platform: time_pattern
hours: '/7'
minutes: 18
condition:
- condition: template
value_template: >
{%- if states.automation.random_youtube_videos_bearstone.attributes.last_triggered -%}
{{ (as_timestamp(now()) - as_timestamp(states.automation.random_youtube_videos_bearstone.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:
pick: !include ../templates/speech/youtube_picker.yaml
- alias: 'Random YouTube Videos CCostan'
id: 3e8a4db0-165b-4e1b-acb0-ac4503525660
mode: single
trigger:
- platform: time_pattern
hours: '/22'
minutes: 45
condition:
- condition: template
value_template: >
{%- if states.automation.random_youtube_videos_ccostan.attributes.last_triggered -%}
{{ (as_timestamp(now()) - as_timestamp(states.automation.random_youtube_videos_ccostan.attributes.last_triggered)) > 10000 }}
{%- else -%}
true
{%- endif -%}
action:
- service: script.tweet_youtube_engine_setup
data:
who: 'ccostan'
pick: !include ../templates/speech/youtube_picker.yaml

View File

@@ -11,40 +11,3 @@
sensor:
- platform: youtube
channel_id: UC301G8JJFzY0BZ_0lshpKpQ
automation:
- alias: YouTube Notification - vCloudInfo
id: 4840f2ae-a0eb-497b-bf78-5e99ff28a9f0
trigger:
- platform: state
entity_id: sensor.vcloudinfo
attribute: url
condition:
- condition: template
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
action:
- repeat:
count: 1
sequence:
- delay: '00:03:00'
- service: script.tweet_engine_no_image
data:
tweet: >
{{ [
"New Video! {{ states('sensor.vcloudinfo') }} - {{ state_attr('sensor.vcloudinfo','url') }} "
] | random }}
who: 'ccostan'
- delay: '00:10:00'
- service: script.tweet_engine_no_image
data:
tweet: >
{{ [
"New Video! {{ states('sensor.vcloudinfo') }} - {{ state_attr('sensor.vcloudinfo','url') }} "
] | random }}
who: 'BearStoneHA'
- delay: '12:30:00'