Updates to random delays. Making them even more random of course! :)

This commit is contained in:
ccostan
2018-06-14 15:33:39 -04:00
parent 1e6368798a
commit 87b0fa3adf
8 changed files with 16 additions and 21 deletions

View File

@@ -74,7 +74,7 @@ automation:
message: 'Today is {{ states.sensor.holiday.state }}.'
title: '{{ states.sensor.holiday.state }}'
- delay: '{{ (range(4, 8)|random|int) }}:{{ (range(1, 50)|random|int) }}:00'
- 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_template:
tweet: >

View File

@@ -114,7 +114,7 @@ automation:
entity_id: sensor.carlojuice_charging_status
from: 'charging'
action:
- delay: '0{{ range(0,4) | random | int }}:00:00'
- delay: '0{{ range(0,3) | random | int }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.tweet_engine_image
data_template:
tweet: >

View File

@@ -100,7 +100,7 @@ automation:
platform: time
at: '23:50:00'
action:
- delay: '00:{{ (range(1, 9)|random|int) }}:00'
- delay: '00:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.tweet_engine_image
data_template:
tweet: >
@@ -121,7 +121,7 @@ automation:
platform: time
at: '04:30:00'
action:
- delay: '{{ (range(1, 6)|random|int) }}:{{ (range(1, 50)|random|int) }}:00'
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.tweet_engine_image
data_template:
tweet: >

View File

@@ -107,13 +107,14 @@ automation:
"/config/www/custom_ui/floorplan/images/branding/space2.png",
"/config/www/custom_ui/floorplan/images/branding/starman.png"
] | random }}
- alias: 'Full Moon -Tweet'
trigger:
- platform: state
entity_id: sensor.moon
to: 'Full Moon'
action:
- delay: '{{ (range(1, 6)|random|int) }}:{{ (range(1, 50)|random|int) }}:00'
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.tweet_engine_image
data_template:
tweet: >-

View File

@@ -258,18 +258,10 @@ automation:
- alias: 'ThrowBack message'
trigger:
- platform: time
hours: '/11'
hours: '/14'
minutes: 13
seconds: 00
# 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)) > 2000 }}
# {
# %- else -%}
# true
# {%- endif -%}
action:
- service: notify.ccostan
data_template:
@@ -283,6 +275,7 @@ automation:
"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)",
"Some of my favorite #Docker Containers that I am using - (https://www.vcloudinfo.com/2018/06/rolling-out-some-new-docker-containers.html)",
"Be Sure to follow all of my Twitter Accounts! @CCostan and my HOUSE bot @BearStoneHA!",
"Be sure to like me on Facebook and join our HA group! (https://www.facebook.com/groups/HomeAssistant/) (https://www.facebook.com/VMwareInfo/) (https://www.facebook.com/BearStoneHA/)",
"You can see how ALL of this is done by browsing my GitHub Repository (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",
@@ -315,14 +308,14 @@ automation:
true
{%- endif -%}
action:
- delay: '0{{ range(0,2) | random | int }}:{{ range(10,59) | random | int }}:00'
- 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
data_template:
pick: >-
{% set pick = [
"minecraft",
"solar", "solar", "solar",
"robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot","robot","robot","robot",
"robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot","robot","robot","robot","robot",
"door", "door", "door",
"weather", "weather", "weather", "weather", "weather",
"cloud",