2019-10-08 00:29:29 +00:00
|
|
|
###############################################################################
|
|
|
|
# @author : Jeffrey Stone
|
|
|
|
# @date : 02/19/2019
|
|
|
|
# @package : Events
|
|
|
|
# @description : Special Events.
|
|
|
|
###############################################################################
|
2020-04-10 17:40:27 +00:00
|
|
|
|
|
|
|
input_boolean:
|
|
|
|
rex_manning_audio:
|
|
|
|
name: Rex Manning audio
|
|
|
|
icon: mdi:speaker-wireless
|
|
|
|
|
2019-10-08 00:29:29 +00:00
|
|
|
automation:
|
|
|
|
- id: refresh_special_event_sensors
|
|
|
|
alias: Refresh special event sensors
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: time
|
|
|
|
at: '00:00:01'
|
|
|
|
- platform: homeassistant
|
|
|
|
event: start
|
|
|
|
action:
|
|
|
|
- service: python_script.special_events
|
|
|
|
data:
|
|
|
|
name: Skylar
|
|
|
|
type: birthday
|
|
|
|
date: !secret skylar_bday
|
|
|
|
- service: python_script.special_events
|
|
|
|
data:
|
|
|
|
name: Jeff
|
|
|
|
type: birthday
|
|
|
|
date: !secret jeff_bday
|
|
|
|
- service: python_script.special_events
|
|
|
|
data:
|
|
|
|
name: Kat
|
|
|
|
type: birthday
|
|
|
|
date: !secret kat_bday
|
|
|
|
- service: python_script.special_events
|
|
|
|
data:
|
|
|
|
name: Our wedding
|
|
|
|
type: anniversary
|
|
|
|
date: !secret wed_anniversary
|
|
|
|
- service: python_script.special_events
|
|
|
|
data:
|
|
|
|
name: Disney
|
|
|
|
type: trip
|
|
|
|
date: !secret disney_trip
|
|
|
|
|
2020-04-10 17:40:27 +00:00
|
|
|
- id: rex_manning_audio
|
|
|
|
alias: Rex Manning Day Audio
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: time
|
|
|
|
at: '14:00:00'
|
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: calendar.anchorage_holidays
|
|
|
|
state: "on"
|
|
|
|
- condition: template
|
|
|
|
value_template: >
|
|
|
|
{%- set event=states.calendar.anchorage_holidays.attributes.message %}
|
|
|
|
{%- if event == 'Rex Manning Day' %}
|
|
|
|
true
|
|
|
|
{%- endif -%}
|
|
|
|
action:
|
|
|
|
- service: script.turn_on
|
|
|
|
entity_id: script.rex_manning_audio
|
|
|
|
- delay:
|
|
|
|
seconds: 40
|
|
|
|
- service: script.turn_off
|
|
|
|
entity_id: script.rex_manning_audio
|
|
|
|
- service: media_player.media_stop
|
|
|
|
entity_id: media_player.ha_speaker
|
2020-04-14 02:17:51 +00:00
|
|
|
|
2020-04-30 01:37:39 +00:00
|
|
|
- id: new_ha_notification
|
|
|
|
alias: New HA Notification
|
|
|
|
initial_state: true
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.updater
|
|
|
|
from: 'off'
|
|
|
|
to: 'on'
|
|
|
|
action:
|
|
|
|
- service: script.twitter_new_ha
|
|
|
|
# - service: ifttt.trigger
|
|
|
|
# data_template: {"event":"GitPost", "value1":"Home Assistant {{ states.binary_sensor.updater.attributes.newest_version }} is now available.", "value2":"{{ states.binary_sensor.updater.attributes.newest_version }}"}
|
|
|
|
- service: rest_command.new_version_github_issue
|
|
|
|
data_template:
|
|
|
|
version: "{{ states.binary_sensor.updater.attributes.newest_version }}"
|
|
|
|
|
|
|
|
|
2020-04-10 17:40:27 +00:00
|
|
|
script:
|
|
|
|
|
|
|
|
rex_manning_audio:
|
|
|
|
sequence:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.audible_notifications
|
|
|
|
state: 'on'
|
|
|
|
- condition: state
|
|
|
|
entity_id: sensor.family_status
|
|
|
|
state: Home
|
|
|
|
- service: media_player.turn_on
|
|
|
|
entity_id: media_player.ha_speaker
|
|
|
|
- service: media_player.volume_set
|
|
|
|
data_template:
|
|
|
|
entity_id: media_player.ha_speaker
|
|
|
|
volume_level: .4
|
|
|
|
- service: media_player.play_media
|
|
|
|
entity_id: media_player.ha_speaker
|
|
|
|
data:
|
|
|
|
media_content_id: http://192.168.7.40/audio/Rex_Manning_-_Say_No_More_Mon_Amour.mp3
|
2020-04-30 01:37:39 +00:00
|
|
|
media_content_type: "music"
|
|
|
|
|
|
|
|
rest_command:
|
|
|
|
new_version_github_issue:
|
|
|
|
url: https://api.github.com/repos/thejeffreystone/home-assistant-configuration/issues
|
|
|
|
method: POST
|
|
|
|
headers:
|
2020-05-02 00:48:19 +00:00
|
|
|
Authorization: !secret github_issue_token
|
2020-04-30 01:37:39 +00:00
|
|
|
payload: '{"title":"Home-Assistant {{ version }} available","body":"Home-Assistant {{ version }} is now available"}'
|