Added in some Twitter, Alexa and Conditions to prevent double runs and some spacing.
This commit is contained in:
parent
c2c4f31953
commit
76b7606558
|
@ -10,6 +10,9 @@
|
|||
- platform: state
|
||||
entity_id: group.family
|
||||
to: 'not_home'
|
||||
- platform: state
|
||||
entity_id: input_boolean.good_night
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
|
@ -23,3 +26,5 @@
|
|||
- service: script.interior_off
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.back_landscaping
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.good_night
|
||||
|
|
|
@ -74,15 +74,17 @@ automation:
|
|||
# - platform: event
|
||||
# event_type: skybell_pressed
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{%- if states.binary_sensor.skybell_stone_door_button.attributes.last_triggered -%}
|
||||
{{ (as_timestamp(now()) - as_timestamp(states.binary_sensor.skybell_stone_door_button.attributes.last_triggered)) > 200 }}
|
||||
{%- else -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
|
||||
action:
|
||||
# Disable this automation
|
||||
- service: automation.turn_off
|
||||
entity_id: automation.log_skybell_pressed_activity
|
||||
- service: script.skybell_pressed
|
||||
- delay:
|
||||
minutes: 1
|
||||
# enable this automation - This prevents duplicate pushes.
|
||||
- service: automation.turn_on
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
tweet: >
|
||||
|
|
|
@ -123,10 +123,15 @@ automation:
|
|||
hours: '/4'
|
||||
minutes: 01
|
||||
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)) > 10000 }}
|
||||
{%- else -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
action:
|
||||
- service: automation.turn_off
|
||||
entity_id: automation.random_house_stats
|
||||
- delay: '0{{ range(0,2) | random | int }}:{{ range(10,59) | random | int }}:00'
|
||||
- service: script.tweet_engine
|
||||
data_template:
|
||||
|
@ -150,5 +155,3 @@ automation:
|
|||
"My @getspectrum internet download speed is about {{states.sensor.speedtest_download.state}} Mbit/s and I am a #cordcutter. @TabloTV",
|
||||
"Average Cloud Coverage: {{states.sensor.dark_sky_cloud_coverage.state}}%, Average Temp: {{states.sensor.dark_sky_temperature.state}}°F #Solar"
|
||||
] | random + " #RandomStat"}}
|
||||
- service: automation.turn_on
|
||||
entity_id: automation.random_house_stats
|
||||
|
|
Loading…
Reference in New Issue