Added in Throwback posts to @CCOSTAN #352

This commit is contained in:
ccostan 2018-05-11 17:21:45 -04:00
parent 201716d895
commit 47d29c521f
1 changed files with 12 additions and 5 deletions

View File

@ -245,14 +245,14 @@ automation:
- alias: 'ThrowBack message' - alias: 'ThrowBack message'
trigger: trigger:
- platform: time - platform: time
hours: '/4' hours: '/8'
minutes: 15 minutes: 15
seconds: 00 seconds: 00
condition: condition:
- condition: template - condition: template
value_template: > value_template: >
{%- if states.automation.random_house_stats.attributes.last_triggered -%} {%- if states.automation.random_house_stats.attributes.last_triggered -%}
{{ (as_timestamp(now()) - as_timestamp(states.automation.random_house_stats.attributes.last_triggered)) > 1000 }} {{ (as_timestamp(now()) - as_timestamp(states.automation.random_house_stats.attributes.last_triggered)) > 2000 }}
{%- else -%} {%- else -%}
true true
{%- endif -%} {%- endif -%}
@ -261,11 +261,18 @@ automation:
data_template: data_template:
message: >- message: >-
{% set phrases = [ {% set phrases = [
"New Code: " "One of the most popular #SmartHome Projects I have done: (https://www.vcloudinfo.com/2017/07/visualizing-smart-home-using-home.html)",
"This project was one of the most popular: (https://www.vcloudinfo.com/2017/11/building-digital-cuckoo-clock-with-home.html)",
"Some of the Best Home Assistant resources around! (https://www.vcloudinfo.com/2018/04/some-of-my-favorite-home-assistant.html)",
"My Journey to Docker #ThrowBack - (https://www.vcloudinfo.com/2018/02/journey-to-docker.html)",
"My Popular DIY Motion Sensor #ThrowBack - (https://www.vcloudinfo.com/2017/11/yet-another-inexpensive-motion-sensor.html)",
"Build your own DIY Outdoor Smart Home LED strips - (https://www.vcloudinfo.com/2017/08/diy-outdoor-smart-home-led-strips.html)",
"Breakdown of the entire smart home - (https://www.vcloudinfo.com/2017/07/my-smart-home-look-at-parts-that-make.html)",
"Build your own Home Alarm System - (https://www.vcloudinfo.com/2017/06/building-my-home-alarm-system-hardware.html)"
] %} ] %}
{% set hashtags = [ {% set hashtags = [
"#IOT", "#IOT #SmartHome",
"#SmartHome" "#Throwback"
] %} ] %}
{{ phrases|random ~ " " ~ hashtags|random }} {{ phrases|random ~ " " ~ hashtags|random }}
data_template: data_template: