Cleaned up space notifications
This commit is contained in:
parent
f017bbda6e
commit
b3a4ea8ce5
|
@ -54,6 +54,7 @@ sensor:
|
||||||
automation:
|
automation:
|
||||||
|
|
||||||
- id: iss_tweet
|
- id: iss_tweet
|
||||||
|
initial_state: true
|
||||||
alias: 'ISS Tweet'
|
alias: 'ISS Tweet'
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
|
@ -66,17 +67,33 @@ automation:
|
||||||
data_template:
|
data_template:
|
||||||
message: >-
|
message: >-
|
||||||
{{ [
|
{{ [
|
||||||
"The #ISS is passing over. Wave.",
|
"The #ISS is passing over. Wave. #Space #theycanseeourhouse ",
|
||||||
"The #ISS just flew by and there is 1 Starman driving a #Tesla and {{states.binary_sensor.iss.attributes.number_of_people_in_space}} people in",
|
"The #ISS just flew by with there are {{states.binary_sensor.iss.attributes.number_of_people_in_space}} people doing cool stuff. #Space #theycanseeourhouse",
|
||||||
"The #ISS just flew by and there are {{states.binary_sensor.iss.attributes.number_of_people_in_space}} people in"
|
"The #ISS just flew by with {{states.binary_sensor.iss.attributes.number_of_people_in_space}} people in it. #Space #theycanseeourhouse"
|
||||||
] | random + " #Space #theycanseeourhouse"}}
|
] | random }}
|
||||||
|
|
||||||
|
- id: iss_notification
|
||||||
|
initial_state: true
|
||||||
|
alias: 'ISS Notification'
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id:
|
||||||
|
- binary_sensor.iss
|
||||||
|
to: 'on'
|
||||||
|
from: 'off'
|
||||||
|
action:
|
||||||
|
- service: script.voice_notify
|
||||||
|
data_template:
|
||||||
|
message: !include ../templates/iss_report.yaml
|
||||||
|
|
||||||
|
|
||||||
- id: full_moon_tweet
|
- id: full_moon_tweet
|
||||||
|
initial_state: true
|
||||||
alias: 'Full Moon -Tweet'
|
alias: 'Full Moon -Tweet'
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: sensor.moon
|
entity_id: sensor.moon
|
||||||
to: 'Full Moon'
|
to: 'full_moon'
|
||||||
action:
|
action:
|
||||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||||
- service: script.twitter_notify
|
- service: script.twitter_notify
|
||||||
|
|
Loading…
Reference in New Issue