Testing out Variables for Facebook postings.

This commit is contained in:
ccostan 2018-01-12 11:13:55 -05:00
parent 31d1f85bc0
commit 3f1f1f58b7
2 changed files with 10 additions and 6 deletions

View File

@ -20,10 +20,10 @@
"Since it gets dark around sunset, I turn on the landscaping lights.", "Since it gets dark around sunset, I turn on the landscaping lights.",
"Since it is sunset, I will turn on the exterior lights." "Since it is sunset, I will turn on the exterior lights."
] | random + [ ] | random + [
"#Sunset", " #Sunset",
"#HomeAutomation", " #HomeAutomation",
"AccentLighting", " #AccentLighting",
"(http://www.vmwareinfo.com/2017/08/diy-outdoor-smart-home-led-strips.html)" " (http://www.vmwareinfo.com/2017/08/diy-outdoor-smart-home-led-strips.html)"
] | random }} ] | random }}
- delay: '00:{{ (range(1, 20)|random|int) }}:00' - delay: '00:{{ (range(1, 20)|random|int) }}:00'
- service: script.speech_engine - service: script.speech_engine

View File

@ -1,5 +1,6 @@
###################################################################################################### ######################################################################################################
###Script to send notifications to Twitter as @BearStoneHA. ###Script to send notifications to Twitter as @BearStoneHA.
## Publish on Facebook as well - https://www.facebook.com/BearStoneHA/
## Enhancements by @dale3h ## Enhancements by @dale3h
###################################################################################################### ######################################################################################################
@ -10,9 +11,12 @@ tweet_engine:
message: >- message: >-
{{ tweet }} #IOT #SmartHome {{ tweet }} #IOT #SmartHome
- service: ifttt.trigger - service: ifttt.trigger
data_template: data_template:
event: >- event: >-
facebook_tweet facebook_tweet
value1: >- value1: >
{{ tweet }} {% set facebook_tweet = tweet %}
{{ facebook_tweet }} #IOT #SmartHome