Updated with some new Tweet Logic and easier names - #720 - YouTube Sensors as well.

This commit is contained in:
ccostan
2020-06-27 13:24:25 -04:00
parent 199b79d6ec
commit 691ee15e9d
10 changed files with 73 additions and 57 deletions

View File

@@ -35,7 +35,7 @@ automation:
value1: "{{ trigger.to_state.attributes.friendly_name }} is at {{ trigger.to_state.state }} "
who: 'carlo'
apns_id: 'information'
- service: script.tweet_engine
- service: script.tweet_engine_no_image
data:
tweet: 'Looks like my {{ trigger.to_state.attributes.friendly_name }} is LOW. @CCostan - Get me some more (https://amzn.to/2AnpFwD)'

View File

@@ -45,7 +45,7 @@ automation:
data_template:
value1: "An emergency has been detected on {{ trigger.to_state.attributes.friendly_name }} Please investigate IMMEDIATELY."
- service: script.tweet_engine
- service: script.tweet_engine_no_image
data_template:
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)"
@@ -79,6 +79,6 @@ automation:
who: "parents"
apns_id: 'Nest-Protect'
- service: script.tweet_engine
- 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) #Safety"

View File

@@ -56,7 +56,7 @@ automation:
value1: 'Go Outside! There is a Rocket Launch very soon!'
apns_id: 'information'
- service: script.tweet_engine
- service: script.tweet_engine_no_image
data_template:
tweet: 'There is a Rocket launch happening right now! I can see it if I look closely. @BrianCribbs #SpaceX #Space'

View File

@@ -251,7 +251,7 @@ automation:
{%- 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_setup
- service: script.tweet_engine_random
data_template:
pick: >-
{% set pick = [

View File

@@ -23,10 +23,20 @@ automation:
entity_id: sensor.vcloudinfo
action:
- service: script.tweet_engine_image
- service: script.tweet_engine_no_image
data_template:
tweet: >
{{ [
"New Video! {{ states('sensor.vcloudinfo_info') }} - {{ state_attr('sensor.vcloudinfo','url') }} "
] | random }}
image: "{{state_attr('sensor.vcloudinfo','entity_picture')}}"
who: 'ccostan'
- delay: '00:10:00'
- service: script.tweet_engine_no_image
data_template:
tweet: >
{{ [
"New Video! {{ states('sensor.vcloudinfo_info') }} - {{ state_attr('sensor.vcloudinfo','url') }} "
] | random }}
who: 'BearStoneHA'