mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-08-20 12:46:45 +00:00
Updated to V5 Version - Hassio Style
Lots of updates here. Updated my Readme - Added Affiliate Links, added some more information, better organized devices Updated gitignore with paths realtive to my hassio config Combined my switches and lights into single yaml files instead of the directory structure previously Added zigbee2mqtt.yaml to packages - contains automations and such for zigbee2mqtt Archived my previous version in the V4-config branch.
This commit is contained in:
10
config/alerts/garage_after_dark.yaml
Executable file
10
config/alerts/garage_after_dark.yaml
Executable file
@@ -0,0 +1,10 @@
|
||||
garage_after_dark:
|
||||
name: Garage is open...Please Check
|
||||
done_message: Garage is closed
|
||||
entity_id: input_boolean.garage_after_dark
|
||||
state: 'on'
|
||||
repeat: 5
|
||||
can_acknowledge: false
|
||||
skip_first: False
|
||||
notifiers:
|
||||
- all_ios
|
10
config/alerts/jeff_bad_traffic_home.yaml
Executable file
10
config/alerts/jeff_bad_traffic_home.yaml
Executable file
@@ -0,0 +1,10 @@
|
||||
jeff_bad_traffic_home:
|
||||
name: Leave Now! Currently {{states.sensor.jeff_ett_home.attributes.duration | round}} mins home!
|
||||
done_message: Canceling Traffic Alert
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
state: 'on'
|
||||
repeat: 10
|
||||
can_acknowledge: false
|
||||
skip_first: False
|
||||
notifiers:
|
||||
- jeff_ios
|
9
config/alerts/jeff_heading_home.yaml
Executable file
9
config/alerts/jeff_heading_home.yaml
Executable file
@@ -0,0 +1,9 @@
|
||||
jeff_heading_home:
|
||||
name: Jeff will arrive in {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes.
|
||||
entity_id: input_boolean.jeff_travel_monitor
|
||||
state: 'on'
|
||||
repeat: 20
|
||||
can_acknowledge: false
|
||||
skip_first: False
|
||||
notifiers:
|
||||
- ios_katherinestonesiphone
|
10
config/alerts/kat_heading_home.yaml
Executable file
10
config/alerts/kat_heading_home.yaml
Executable file
@@ -0,0 +1,10 @@
|
||||
kat_heading_home:
|
||||
name: Kat will be home in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes.
|
||||
done_message: Kat Travel Monitor Disabled
|
||||
entity_id: input_boolean.kat_travel_monitor
|
||||
state: 'on'
|
||||
repeat: 20
|
||||
can_acknowledge: false
|
||||
skip_first: False
|
||||
notifiers:
|
||||
- jeff_ios
|
10
config/alerts/lockdown_issue.yaml
Executable file
10
config/alerts/lockdown_issue.yaml
Executable file
@@ -0,0 +1,10 @@
|
||||
lockdown_issue:
|
||||
name: Issue Prevented Lockdown...Please Check
|
||||
done_message: Issue Resolved...Anchorage House Ready
|
||||
entity_id: input_boolean.lockdown_issue
|
||||
state: 'on'
|
||||
repeat: 2
|
||||
can_acknowledge: false
|
||||
skip_first: False
|
||||
notifiers:
|
||||
- all_ios
|
10
config/alerts/unauthorized_access.yaml
Executable file
10
config/alerts/unauthorized_access.yaml
Executable file
@@ -0,0 +1,10 @@
|
||||
unauthorized_access:
|
||||
name: Potential Unauthorized Access Detected at Anchorage House
|
||||
done_message: Security Issue Cleared
|
||||
entity_id: input_boolean.security_issue
|
||||
state: 'on'
|
||||
repeat: 2
|
||||
can_acknowledge: false
|
||||
skip_first: False
|
||||
notifiers:
|
||||
- all_ios
|
631
config/automations.yaml
Normal file
631
config/automations.yaml
Normal file
@@ -0,0 +1,631 @@
|
||||
- id: washer_running
|
||||
alias: Washer Running
|
||||
trigger:
|
||||
- above: 5
|
||||
entity_id: sensor.washer_power
|
||||
platform: numeric_state
|
||||
action:
|
||||
- service: script.washer_running
|
||||
initial_state: true
|
||||
- id: washer_complete
|
||||
alias: Washer Complete
|
||||
trigger:
|
||||
- below: 3
|
||||
entity_id: sensor.washer_power
|
||||
platform: numeric_state
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.washer_status
|
||||
state: running
|
||||
action:
|
||||
- service: script.washer_complete
|
||||
initial_state: true
|
||||
- id: washer_emptied
|
||||
initial_state: true
|
||||
alias: Washer Emptied
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.washer_door
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: script.washer_idle
|
||||
- service: script.turn_off
|
||||
entity_id: script.washer_finished_notification_audible
|
||||
- id: washer_notification
|
||||
initial_state: true
|
||||
alias: Washer Notification
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.washer_status
|
||||
from: running
|
||||
to: complete
|
||||
action:
|
||||
- service: script.washer_finished_notification_audible
|
||||
- id: turn_off_disney
|
||||
initial_state: true
|
||||
alias: Turn Off Disney
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.hass_speaker
|
||||
from: playing
|
||||
to: idle
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.tiki_room_audio
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.happy_ever_after_show
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.haunted_mansion
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.boo_to_you_show
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.spaceship_earth_ride
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.mk_loop
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.illuminations
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.boo_to_you
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.happy_ever_after
|
||||
- id: backup_hass
|
||||
initial_state: true
|
||||
alias: Backup Hass
|
||||
trigger:
|
||||
- platform: time
|
||||
at: 05:00:00
|
||||
action:
|
||||
- service: shell_command.backup
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: '{{ [ "I just kicked off a backup of #homeassistant to ensure I live
|
||||
on. Do you backup? ", "Its important to backup your data. Thats why I just
|
||||
intitiated a backup of my critical data. ", "With @home_assistant and the
|
||||
#dropbox component it is easy to backup your important config files. Lets
|
||||
do this thing! " ] | random }}'
|
||||
|
||||
- id: coffee_time
|
||||
alias: Coffee Time
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.coffee_time', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.diminshed_livingroom_lighting
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.diminished_kitchen_lighting
|
||||
- service: alarm_control_panel.alarm_arm_home
|
||||
entity_id: alarm_control_panel.ah_base_station
|
||||
|
||||
- id: good_morning
|
||||
alias: Good Morning
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.good_morning', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.normal_livingroom_lighting
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.normal_kitchen_lighting
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.0xf0d1b80000052281_switch # Rainbow Light
|
||||
- service: light.turn_on
|
||||
entity_id: light.0xe20db9fffe003637_light # Skylar's Lamp
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_light_on
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: '{{ [ "Good Morning! Time to rise and shine at Anchorage House. ",
|
||||
"Good Morning from Anchorage House. Glad to see everyone made it. ", "Birds
|
||||
are awake, and so is Anchorage House. Good morning everyone! " ] | random
|
||||
}}'
|
||||
|
||||
- id: skylar_bedtime
|
||||
alias: Skylar Bedtime
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '19:15:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.0xf0d1b80000052281_switch # Rainbow Light
|
||||
- service: light.turn_on
|
||||
entity_id: light.0xe20db9fffe003637_light
|
||||
- service: alarm_control_panel.alarm_arm_away
|
||||
entity_id: alarm_control_panel.ah_base_station
|
||||
- id: jeff_lights_out
|
||||
alias: Jeff lights out
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '23:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_light_off
|
||||
- id: jeff_bedtime
|
||||
alias: Jeff bedtime
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '22:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.jeff_light
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_bedtime
|
||||
- id: jeff_night_light
|
||||
alias: Jeff night light
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '22:30:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.jeff_light
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_night_light
|
||||
- id: jeff_light_on
|
||||
alias: Jeff Light On
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '20:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_light_on
|
||||
- id: jeff_alarm
|
||||
alias: Jeff alarm
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: 05:15:00
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_night_light
|
||||
- id: jeff_wake_up
|
||||
alias: Jeff wake up
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: 05:30:00
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_wake_up
|
||||
- id: good_night
|
||||
alias: Good Night
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '22:30:00'
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.night_time_livingroom_lighting
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.upstairs_fan
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.upstairs
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.incense
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.artemis
|
||||
- service: light.turn_off
|
||||
data:
|
||||
entity_id: light.kitchen_cabinet_lights
|
||||
- service: light.turn_off
|
||||
data:
|
||||
entity_id: light.kitchen_cabinets
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: '{{ [ "Good Night from Anchorage House. ", "Time to shut down this
|
||||
party. Good Night from Anchorage House. ", "We have come to the end of our
|
||||
broadcast day. Oh, who am I kidding. I''ll be up all night watching over Anchorage
|
||||
House. " ] | random }}'
|
||||
- id: outside_lights_on_sunset
|
||||
alias: Outside Lights on at Sunset
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunset
|
||||
offset: -00:30:00
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
data:
|
||||
entity_id: switch.front_porch
|
||||
- service: script.sunset_garage_open
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: '{{ [ "Its getting dark at Anchorage House, so Im turning on the outside
|
||||
lights. ", "When the Sun goes down, I help out by turning on the outside lights.
|
||||
Its the little things. ", "Its getting dark so let me spell out my name...
|
||||
Wait. Did I break into a random #Hamilton song? Pardon me. umm. I just turned
|
||||
on the outside lights at Anchorage House. " ] | random }}'
|
||||
- service: alarm_control_panel.alarm_arm_away
|
||||
entity_id: alarm_control_panel.ah_base_station
|
||||
|
||||
- id: sunset
|
||||
alias: Sunset
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunset
|
||||
action:
|
||||
- service: alarm_control_panel.alarm_arm_away
|
||||
entity_id: alarm_control_panel.ah_base_station
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
call_dark_outside: 1
|
||||
call_garage_door_status: 1
|
||||
|
||||
- id: outside_lights_off_sunrise
|
||||
alias: Outside Lights off at Sunrise
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunrise
|
||||
action:
|
||||
- service: switch.turn_off
|
||||
data:
|
||||
entity_id: switch.front_porch
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: '{{ [ "The sun is up at Anchorage House, so Im turning off the outside
|
||||
lights. ", "I see the sun! Time to turn off the outside lights at Anchorage
|
||||
House. ", "Dawn has broken at Anchorage House. Turning off the outside lights.
|
||||
" ] | random }}'
|
||||
- service: alarm_control_panel.alarm_arm_home
|
||||
entity_id: alarm_control_panel.ah_base_station
|
||||
|
||||
- id: inside_on_sunset
|
||||
alias: Inside on at Sunset
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunset
|
||||
offset: -01:00:00
|
||||
action:
|
||||
service: scene.turn_on
|
||||
entity_id: scene.normal_livingroom_lighting
|
||||
- id: inside_off_sunrise
|
||||
alias: Inside off at Sunrise
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunrise
|
||||
offset: 00:30:00
|
||||
condition:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.dark_sky_cloud_coverage
|
||||
below: 50
|
||||
action:
|
||||
- service: script.inside_all_off
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.jeff_light_off
|
||||
- id: ha_start
|
||||
alias: HA Startup
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
service: frontend.set_theme
|
||||
data:
|
||||
name: midnight-AH
|
||||
- id: turn_off_audible_notifications
|
||||
alias: Turn Off Audible Notifications
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '19:30:00'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.audible_notifications
|
||||
- id: turn_off_audible_notifications_guests
|
||||
alias: Turn Off Audible Notifications at 7pm
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '19:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.audible_notifications
|
||||
- id: turn_on_audible_notifications
|
||||
alias: Turn On Audible Notifications at 7am
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: 06:40:00
|
||||
action:
|
||||
- entity_id: input_boolean.audible_notifications
|
||||
service: input_boolean.turn_on
|
||||
- id: jeff_eta_home
|
||||
alias: Jeff eta home
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.jeff_destination
|
||||
to: Home
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.notification_mode
|
||||
state: Normal
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.jeff_travel_monitor
|
||||
- id: enable_bad_traffic_home_jeff
|
||||
alias: Notify Jeff - Bad Traffic
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.jeff_ett_home
|
||||
above: 59
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.jeff_location
|
||||
state: Summit
|
||||
- condition: state
|
||||
entity_id: input_boolean.jeff_traffic_alerts
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: '{{ [ "Looks like traffic is bad out there so I let @thejeffreystone
|
||||
know. ", "I dont think todays traffic is the worst I''ve seen, but its bad.
|
||||
Letting my residents know they need to plan their trips. ", "Oh great...traffic
|
||||
can''t get any worse. Maybe everyone should stay where they are. " ] | random
|
||||
}}'
|
||||
- id: disable_bad_traffic_home_jeff
|
||||
alias: Disabling Jeff Bad Traffic Home
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.jeff_ett_home
|
||||
below: 40
|
||||
- platform: state
|
||||
entity_id: sensor.jeff_destination
|
||||
to: Home
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
- id: '1550107919204'
|
||||
alias: Family Is Home Webhook
|
||||
trigger:
|
||||
- platform: webhook
|
||||
webhook_id: home_webhook
|
||||
condition: []
|
||||
action:
|
||||
- service: script.family_is_home
|
||||
- id: '1550108034209'
|
||||
alias: Family Is Away Webhook
|
||||
trigger:
|
||||
- platform: webhook
|
||||
webhook_id: away_webhook
|
||||
condition: []
|
||||
action:
|
||||
- service: script.family_is_away
|
||||
|
||||
- id: set_coffee_time
|
||||
alias: set soffee time
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '00:02:15'
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.coffee_time
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.binary_sensor.workday_sensor.state == 'on' %}
|
||||
04:30
|
||||
{% else %}
|
||||
07:15
|
||||
{% endif %}
|
||||
|
||||
- id: set_good_morning_time
|
||||
alias: set good morning time
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '05:55:00'
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.good_morning
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.calendar.skylar_school.attributes.offset_reached == True %}
|
||||
06:00
|
||||
{% elif states.binary_sensor.workday_sensor.state == 'on' %}
|
||||
06:30
|
||||
{% else %}
|
||||
07:25
|
||||
{% endif %}
|
||||
|
||||
- id: upstairs_fan_on
|
||||
alias: Upstairs Fan On
|
||||
initial_state: true
|
||||
trigger:
|
||||
- entity_id: binary_sensor.upstairs_occupancy
|
||||
from: 'Off'
|
||||
platform: state
|
||||
to: 'On'
|
||||
condition:
|
||||
- above: '73'
|
||||
condition: numeric_state
|
||||
entity_id: sensor.upstairs_temperature
|
||||
action:
|
||||
- data:
|
||||
entity_id: switch.upstairs_fan
|
||||
service: switch.turn_on
|
||||
|
||||
- id: '1558630577206'
|
||||
alias: Garage Is Open at 9pm
|
||||
initial_state: true
|
||||
trigger:
|
||||
- at: '21:00:00'
|
||||
platform: time
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garage_door_contact_2
|
||||
state: 'on'
|
||||
action:
|
||||
- data:
|
||||
entity_id: input_boolean.garage_after_dark
|
||||
service: input_boolean.turn_on
|
||||
- id: '1559612300685'
|
||||
alias: Garage Closed
|
||||
initial_state: true
|
||||
trigger:
|
||||
- entity_id: binary_sensor.garage_door_contact_2
|
||||
from: 'on'
|
||||
platform: state
|
||||
to: 'off'
|
||||
condition: []
|
||||
action:
|
||||
- data:
|
||||
entity_id: input_boolean.garage_after_dark
|
||||
service: input_boolean.turn_off
|
||||
- id: '1562066108032'
|
||||
alias: Living Room Fan On
|
||||
initial_state: true
|
||||
trigger:
|
||||
- entity_id: binary_sensor.living_room_occupancy
|
||||
from: 'off'
|
||||
platform: state
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: switch.living_room_fan
|
||||
state: 'off'
|
||||
action:
|
||||
- data:
|
||||
entity_id: switch.living_room_fan
|
||||
service: switch.turn_on
|
||||
- id: '1562067639239'
|
||||
alias: Upstairs Fan Off
|
||||
initial_state: true
|
||||
trigger:
|
||||
- entity_id: binary_sensor.upstairs_occupancy
|
||||
from: 'on'
|
||||
platform: state
|
||||
to: 'off'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: switch.upstairs_fan
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: media_player.tsr_6750_a3ed2f
|
||||
state: 'off'
|
||||
action:
|
||||
- data:
|
||||
entity_id: switch.upstairs_fan
|
||||
service: switch.turn_off
|
||||
- id: '1562630916597'
|
||||
alias: Kat Pill Reminder
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.kat_pill_reminder', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- data:
|
||||
message: Remember to take meds
|
||||
service: notify.kat_ios
|
||||
|
||||
|
||||
# - id: turn_off_ha_speaker
|
||||
# alias: Turn Off HA Speaker
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: media_player.hass_speaker
|
||||
# from: 'playing'
|
||||
# to: 'idle'
|
||||
# action:
|
||||
# - service: media_player.turn_off
|
||||
# entity_id: media_player.hass_speaker
|
||||
# initial_state: true
|
||||
|
||||
- id: turn_off_kitchen_speaker
|
||||
alias: Turn Off Kitchen Display
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.googlehomehub3492
|
||||
from: 'playing'
|
||||
to: 'idle'
|
||||
action:
|
||||
- service: media_player.turn_off
|
||||
entity_id: media_player.googlehomehub3492
|
||||
initial_state: true
|
||||
|
||||
- id: turn_off_ha_speaker
|
||||
alias: Turn Off HA Speaker
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.theater
|
||||
from: 'playing'
|
||||
to: 'idle'
|
||||
action:
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.ha_speaker
|
||||
- service: media_player.turn_off
|
||||
entity_id: media_player.theater
|
||||
- service: script.kill_this_ride
|
||||
initial_state: true
|
||||
|
||||
|
||||
|
||||
##########################
|
||||
# My Attempt at preventing twitter from being spammed with new HA tweets on reboot
|
||||
|
||||
- id: new_ha
|
||||
alias: New HA
|
||||
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 }}"}
|
||||
###########################
|
16
config/binary_sensors/calendar.yaml
Executable file
16
config/binary_sensors/calendar.yaml
Executable file
@@ -0,0 +1,16 @@
|
||||
- platform: workday
|
||||
country: US
|
||||
province: GA
|
||||
workdays: [mon, tue, wed, thu, fri]
|
||||
- platform: tod
|
||||
name: Night
|
||||
after: sunset
|
||||
before: sunrise
|
||||
- platform: tod
|
||||
name: Day
|
||||
after: sunrise
|
||||
before: sunset
|
||||
- platform: tod
|
||||
name: Quiet time
|
||||
after: '22:00'
|
||||
before: '07:00'
|
42
config/binary_sensors/doors.yaml
Executable file
42
config/binary_sensors/doors.yaml
Executable file
@@ -0,0 +1,42 @@
|
||||
- platform: mqtt
|
||||
name: "Back Door"
|
||||
state_topic: "zwave2mqtt/nodeID_28/48/1/0"
|
||||
payload_on: "open"
|
||||
payload_off: "closed"
|
||||
device_class: door
|
||||
- platform: mqtt
|
||||
name: "Garage Door"
|
||||
state_topic: "zwave2mqtt/nodeID_16/48/1/0"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
device_class: garage_door
|
||||
- platform: mqtt
|
||||
name: "Front Door"
|
||||
state_topic: "zwave2mqtt/nodeID_27/48/1/0"
|
||||
payload_on: "open"
|
||||
payload_off: "closed"
|
||||
device_class: door
|
||||
- platform: mqtt
|
||||
name: "Laundry Room Door"
|
||||
state_topic: "zwave2mqtt/nodeID_26/48/1/0"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
device_class: door
|
||||
- platform: mqtt
|
||||
name: "Attic Door" # Dome Door Sensor
|
||||
state_topic: "zwave2mqtt/nodeID_18/48/1/0"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
device_class: door
|
||||
- platform: mqtt
|
||||
name: "Side Door" # Dome Door Sensor
|
||||
state_topic: "zwave2mqtt/side_door/48/1/0"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
device_class: door
|
||||
- platform: mqtt
|
||||
name: "Washer Door"
|
||||
state_topic: "zwave2mqtt/washer_door/48/1/0"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
device_class: door
|
13
config/binary_sensors/motion.yaml
Executable file
13
config/binary_sensors/motion.yaml
Executable file
@@ -0,0 +1,13 @@
|
||||
- platform: mqtt
|
||||
name: "Garage Motion" # Dome Motion Sensor
|
||||
state_topic: "zwave2mqtt/garage_motion/48/1/0"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
device_class: motion
|
||||
|
||||
# - platform: command_line
|
||||
# name: vlc player
|
||||
# command: 'pidof vlc | wc -l'
|
||||
# payload_on: 1
|
||||
# payload_off: 0
|
||||
# scan_interval: 10
|
187
config/configuration.yaml
Normal file
187
config/configuration.yaml
Normal file
@@ -0,0 +1,187 @@
|
||||
homeassistant:
|
||||
name: Home
|
||||
latitude: !secret MY_LATITUDE
|
||||
longitude: !secret MY_LONGITUDE
|
||||
elevation: 315
|
||||
unit_system: imperial
|
||||
time_zone: America/New_York
|
||||
customize: !include customize.yaml
|
||||
auth_providers:
|
||||
- type: homeassistant
|
||||
packages: !include_dir_named packages
|
||||
|
||||
# Configure a default setup of Home Assistant (frontend, api, etc)
|
||||
default_config:
|
||||
|
||||
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
|
||||
http:
|
||||
base_url: !secret ahsl_base_url
|
||||
ssl_certificate: !secret ahsl_ssl_cert
|
||||
ssl_key: !secret ahsl_ssl_key
|
||||
|
||||
ssdp:
|
||||
|
||||
zeroconf:
|
||||
|
||||
system_health:
|
||||
|
||||
mobile_app:
|
||||
|
||||
person:
|
||||
|
||||
frontend:
|
||||
themes: !include_dir_merge_named themes
|
||||
|
||||
# Text to speech
|
||||
# tts:
|
||||
# - platform: google_translate
|
||||
|
||||
cloud:
|
||||
|
||||
wemo:
|
||||
discovery: true
|
||||
|
||||
weather:
|
||||
- platform: darksky
|
||||
api_key: !secret darksky_api
|
||||
name: Grayson
|
||||
|
||||
conversation:
|
||||
|
||||
device_tracker:
|
||||
# - platform: icloud
|
||||
# username: !secret ICLOUD_USER
|
||||
# password: !secret ICLOUD_PASS
|
||||
# track_new_devices: yes
|
||||
# - platform: owntracks
|
||||
#
|
||||
# - platform: eero_tracker
|
||||
# consider_home: 300
|
||||
# interval_seconds: 60
|
||||
# track_new_devices: yes
|
||||
# only_macs: "d0:c5:f3:80:50:5e, f4:31:c3:84:1d:d1, 08:74:02:CC:C4:97, 5C:F5:DA:9B:5A:A2, 34:7C:25:CC:9D:0F, 64:52:99:93:F1:B3"
|
||||
|
||||
|
||||
google:
|
||||
client_id: !secret google_client_id
|
||||
client_secret: !secret google_client_secret
|
||||
|
||||
arlo:
|
||||
username: !secret arlo_user
|
||||
password: !secret arlo_pass
|
||||
|
||||
alarm_control_panel:
|
||||
- platform: arlo
|
||||
home_mode_name: home
|
||||
away_mode_name: armed
|
||||
|
||||
discovery:
|
||||
ignore:
|
||||
- igd
|
||||
|
||||
updater:
|
||||
include_used_components: true
|
||||
|
||||
sun:
|
||||
|
||||
recorder:
|
||||
#db_url: sqlite:///data/home-assistant_v2.db
|
||||
purge_keep_days: 2
|
||||
exclude:
|
||||
domains:
|
||||
- automation
|
||||
- weblink
|
||||
- updater
|
||||
entities:
|
||||
- sun.sun # Don't record sun data
|
||||
- sensor.last_boot # Comes from 'systemmonitor' sensor platform
|
||||
- sensor.date
|
||||
|
||||
|
||||
logbook:
|
||||
include:
|
||||
domains:
|
||||
- media_player
|
||||
- automation
|
||||
- script
|
||||
|
||||
logger:
|
||||
default: warning
|
||||
#logs:
|
||||
|
||||
# homeassistant.components.sensor.alpha_vantage: debug
|
||||
|
||||
|
||||
history:
|
||||
include:
|
||||
domains:
|
||||
- sensor
|
||||
- switch
|
||||
- media_player
|
||||
- light
|
||||
|
||||
camera:
|
||||
- platform: mjpeg
|
||||
name: Garage Door Cam
|
||||
mjpeg_url: !secret garage_cam
|
||||
- platform: arlo
|
||||
ffmpeg_arguments: '-pred 1 -q:v 2'
|
||||
|
||||
ffmpeg:
|
||||
ffmpeg_bin: /usr/bin/ffmpeg
|
||||
|
||||
life360:
|
||||
accounts:
|
||||
- username: !secret life360_username
|
||||
password: !secret life360_password
|
||||
|
||||
python_script:
|
||||
|
||||
ecobee:
|
||||
api_key: !secret ecobee_api
|
||||
|
||||
map:
|
||||
|
||||
wwlln:
|
||||
radius: 75
|
||||
latitude: !secret MY_LATITUDE
|
||||
longitude: !secret MY_LONGITUDE
|
||||
|
||||
tplink:
|
||||
discovery: false
|
||||
switch:
|
||||
- host: 192.168.7.105
|
||||
- host: 192.168.7.107
|
||||
|
||||
ifttt:
|
||||
key: !secret IFTTT_API_KEY
|
||||
|
||||
media_player:
|
||||
- platform: spotify
|
||||
client_id: !secret spotify_client
|
||||
client_secret: !secret spotify_secret
|
||||
|
||||
group: !include groups.yaml
|
||||
# automation: !include automations.yaml
|
||||
# script: !include scripts.yaml
|
||||
|
||||
|
||||
### Includes ###
|
||||
alert: !include_dir_merge_named alerts/
|
||||
automation: !include automations.yaml
|
||||
script: !include_dir_merge_named scripts
|
||||
#group: !include groups.yaml
|
||||
#automation: !include automations.yaml
|
||||
sensor: !include_dir_merge_list sensors
|
||||
binary_sensor: !include_dir_merge_list binary_sensors
|
||||
#light: !include_dir_merge_list lights
|
||||
light: !include lights.yaml
|
||||
#switch: !include_dir_merge_list switches
|
||||
switch: !include switches.yaml
|
||||
#script: !include_dir_merge_named scripts
|
||||
#intent_script: !include intents/intents.yaml
|
||||
scene: !include scenes.yaml
|
||||
input_select: !include input_select.yaml
|
||||
input_boolean: !include input_boolean.yaml
|
||||
input_datetime: !include input_datetime.yaml
|
||||
zone: !include zones.yaml
|
1
config/custom_components/amazon_polly/_inti_.py
Executable file
1
config/custom_components/amazon_polly/_inti_.py
Executable file
@@ -0,0 +1 @@
|
||||
"""Support for Amazon Polly integration."""
|
243
config/custom_components/amazon_polly/tts.py
Executable file
243
config/custom_components/amazon_polly/tts.py
Executable file
@@ -0,0 +1,243 @@
|
||||
"""Support for the Amazon Polly text to speech service."""
|
||||
import logging
|
||||
import boto3
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.tts import PLATFORM_SCHEMA, Provider
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_REGION = "region_name"
|
||||
CONF_ACCESS_KEY_ID = "aws_access_key_id"
|
||||
CONF_SECRET_ACCESS_KEY = "aws_secret_access_key"
|
||||
CONF_PROFILE_NAME = "profile_name"
|
||||
ATTR_CREDENTIALS = "credentials"
|
||||
|
||||
DEFAULT_REGION = "us-east-1"
|
||||
SUPPORTED_REGIONS = [
|
||||
"us-east-1",
|
||||
"us-east-2",
|
||||
"us-west-1",
|
||||
"us-west-2",
|
||||
"ca-central-1",
|
||||
"eu-west-1",
|
||||
"eu-central-1",
|
||||
"eu-west-2",
|
||||
"eu-west-3",
|
||||
"ap-southeast-1",
|
||||
"ap-southeast-2",
|
||||
"ap-northeast-2",
|
||||
"ap-northeast-1",
|
||||
"ap-south-1",
|
||||
"sa-east-1",
|
||||
]
|
||||
|
||||
CONF_ENGINE = "engine"
|
||||
CONF_VOICE = "voice"
|
||||
CONF_OUTPUT_FORMAT = "output_format"
|
||||
CONF_SAMPLE_RATE = "sample_rate"
|
||||
CONF_TEXT_TYPE = "text_type"
|
||||
|
||||
SUPPORTED_VOICES = [
|
||||
"Zhiyu", # Chinese
|
||||
"Mads",
|
||||
"Naja", # Danish
|
||||
"Ruben",
|
||||
"Lotte", # Dutch
|
||||
"Russell",
|
||||
"Nicole", # English Australian
|
||||
"Brian",
|
||||
"Amy",
|
||||
"Emma", # English
|
||||
"Aditi",
|
||||
"Raveena", # English, Indian
|
||||
"Joey",
|
||||
"Justin",
|
||||
"Matthew",
|
||||
"Ivy",
|
||||
"Joanna",
|
||||
"Kendra",
|
||||
"Kimberly",
|
||||
"Salli", # English
|
||||
"Geraint", # English Welsh
|
||||
"Mathieu",
|
||||
"Celine",
|
||||
"Lea", # French
|
||||
"Chantal", # French Canadian
|
||||
"Hans",
|
||||
"Marlene",
|
||||
"Vicki", # German
|
||||
"Aditi", # Hindi
|
||||
"Karl",
|
||||
"Dora", # Icelandic
|
||||
"Giorgio",
|
||||
"Carla",
|
||||
"Bianca", # Italian
|
||||
"Takumi",
|
||||
"Mizuki", # Japanese
|
||||
"Seoyeon", # Korean
|
||||
"Liv", # Norwegian
|
||||
"Jacek",
|
||||
"Jan",
|
||||
"Ewa",
|
||||
"Maja", # Polish
|
||||
"Ricardo",
|
||||
"Vitoria", # Portuguese, Brazilian
|
||||
"Cristiano",
|
||||
"Ines", # Portuguese, European
|
||||
"Carmen", # Romanian
|
||||
"Maxim",
|
||||
"Tatyana", # Russian
|
||||
"Enrique",
|
||||
"Conchita",
|
||||
"Lucia", # Spanish European
|
||||
"Mia", # Spanish Mexican
|
||||
"Miguel",
|
||||
"Penelope", # Spanish US
|
||||
"Astrid", # Swedish
|
||||
"Filiz", # Turkish
|
||||
"Gwyneth", # Welsh
|
||||
]
|
||||
|
||||
SUPPORTED_OUTPUT_FORMATS = ["mp3", "ogg_vorbis", "pcm"]
|
||||
|
||||
SUPPORTED_ENGINES = ["neural", "standard"]
|
||||
|
||||
SUPPORTED_SAMPLE_RATES = ["8000", "16000", "22050", "24000"]
|
||||
|
||||
SUPPORTED_SAMPLE_RATES_MAP = {
|
||||
"mp3": ["8000", "16000", "22050", "24000"],
|
||||
"ogg_vorbis": ["8000", "16000", "22050"],
|
||||
"pcm": ["8000", "16000"],
|
||||
}
|
||||
|
||||
SUPPORTED_TEXT_TYPES = ["text", "ssml"]
|
||||
|
||||
CONTENT_TYPE_EXTENSIONS = {"audio/mpeg": "mp3", "audio/ogg": "ogg", "audio/pcm": "pcm"}
|
||||
|
||||
DEFAULT_ENGINE = "standard"
|
||||
DEFAULT_VOICE = "Joanna"
|
||||
DEFAULT_OUTPUT_FORMAT = "mp3"
|
||||
DEFAULT_TEXT_TYPE = "text"
|
||||
|
||||
DEFAULT_SAMPLE_RATES = {"mp3": "22050", "ogg_vorbis": "22050", "pcm": "16000"}
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
{
|
||||
vol.Optional(CONF_REGION, default=DEFAULT_REGION): vol.In(SUPPORTED_REGIONS),
|
||||
vol.Inclusive(CONF_ACCESS_KEY_ID, ATTR_CREDENTIALS): cv.string,
|
||||
vol.Inclusive(CONF_SECRET_ACCESS_KEY, ATTR_CREDENTIALS): cv.string,
|
||||
vol.Exclusive(CONF_PROFILE_NAME, ATTR_CREDENTIALS): cv.string,
|
||||
vol.Optional(CONF_VOICE, default=DEFAULT_VOICE): vol.In(SUPPORTED_VOICES),
|
||||
vol.Optional(CONF_ENGINE, default=DEFAULT_ENGINE): vol.In(SUPPORTED_ENGINES),
|
||||
vol.Optional(CONF_OUTPUT_FORMAT, default=DEFAULT_OUTPUT_FORMAT): vol.In(
|
||||
SUPPORTED_OUTPUT_FORMATS
|
||||
),
|
||||
vol.Optional(CONF_SAMPLE_RATE): vol.All(
|
||||
cv.string, vol.In(SUPPORTED_SAMPLE_RATES)
|
||||
),
|
||||
vol.Optional(CONF_TEXT_TYPE, default=DEFAULT_TEXT_TYPE): vol.In(
|
||||
SUPPORTED_TEXT_TYPES
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def get_engine(hass, config):
|
||||
"""Set up Amazon Polly speech component."""
|
||||
output_format = config.get(CONF_OUTPUT_FORMAT)
|
||||
sample_rate = config.get(CONF_SAMPLE_RATE, DEFAULT_SAMPLE_RATES[output_format])
|
||||
if sample_rate not in SUPPORTED_SAMPLE_RATES_MAP.get(output_format):
|
||||
_LOGGER.error(
|
||||
"%s is not a valid sample rate for %s", sample_rate, output_format
|
||||
)
|
||||
return None
|
||||
|
||||
config[CONF_SAMPLE_RATE] = sample_rate
|
||||
|
||||
profile = config.get(CONF_PROFILE_NAME)
|
||||
|
||||
if profile is not None:
|
||||
boto3.setup_default_session(profile_name=profile)
|
||||
|
||||
aws_config = {
|
||||
CONF_REGION: config.get(CONF_REGION),
|
||||
CONF_ACCESS_KEY_ID: config.get(CONF_ACCESS_KEY_ID),
|
||||
CONF_SECRET_ACCESS_KEY: config.get(CONF_SECRET_ACCESS_KEY),
|
||||
}
|
||||
|
||||
del config[CONF_REGION]
|
||||
del config[CONF_ACCESS_KEY_ID]
|
||||
del config[CONF_SECRET_ACCESS_KEY]
|
||||
|
||||
polly_client = boto3.client("polly", **aws_config)
|
||||
|
||||
supported_languages = []
|
||||
|
||||
all_voices = {}
|
||||
|
||||
all_voices_req = polly_client.describe_voices()
|
||||
|
||||
for voice in all_voices_req.get("Voices"):
|
||||
all_voices[voice.get("Id")] = voice
|
||||
if voice.get("LanguageCode") not in supported_languages:
|
||||
supported_languages.append(voice.get("LanguageCode"))
|
||||
|
||||
return AmazonPollyProvider(polly_client, config, supported_languages, all_voices)
|
||||
|
||||
|
||||
class AmazonPollyProvider(Provider):
|
||||
"""Amazon Polly speech api provider."""
|
||||
|
||||
def __init__(self, polly_client, config, supported_languages, all_voices):
|
||||
"""Initialize Amazon Polly provider for TTS."""
|
||||
self.client = polly_client
|
||||
self.config = config
|
||||
self.supported_langs = supported_languages
|
||||
self.all_voices = all_voices
|
||||
self.default_voice = self.config.get(CONF_VOICE)
|
||||
self.name = "Amazon Polly"
|
||||
|
||||
@property
|
||||
def supported_languages(self):
|
||||
"""Return a list of supported languages."""
|
||||
return self.supported_langs
|
||||
|
||||
@property
|
||||
def default_language(self):
|
||||
"""Return the default language."""
|
||||
return self.all_voices.get(self.default_voice).get("LanguageCode")
|
||||
|
||||
@property
|
||||
def default_options(self):
|
||||
"""Return dict include default options."""
|
||||
return {CONF_VOICE: self.default_voice}
|
||||
|
||||
@property
|
||||
def supported_options(self):
|
||||
"""Return a list of supported options."""
|
||||
return [CONF_VOICE]
|
||||
|
||||
def get_tts_audio(self, message, language=None, options=None):
|
||||
"""Request TTS file from Polly."""
|
||||
voice_id = options.get(CONF_VOICE, self.default_voice)
|
||||
voice_in_dict = self.all_voices.get(voice_id)
|
||||
if language != voice_in_dict.get("LanguageCode"):
|
||||
_LOGGER.error("%s does not support the %s language", voice_id, language)
|
||||
return None, None
|
||||
|
||||
resp = self.client.synthesize_speech(
|
||||
Engine=self.config[CONF_ENGINE],
|
||||
OutputFormat=self.config[CONF_OUTPUT_FORMAT],
|
||||
SampleRate=self.config[CONF_SAMPLE_RATE],
|
||||
Text=message,
|
||||
TextType=self.config[CONF_TEXT_TYPE],
|
||||
VoiceId=voice_id,
|
||||
)
|
||||
|
||||
return (
|
||||
CONTENT_TYPE_EXTENSIONS[resp.get("ContentType")],
|
||||
resp.get("AudioStream").read(),
|
||||
)
|
0
config/custom_components/nws_alerts/__init__.py
Executable file
0
config/custom_components/nws_alerts/__init__.py
Executable file
187
config/custom_components/nws_alerts/sensor.py
Executable file
187
config/custom_components/nws_alerts/sensor.py
Executable file
@@ -0,0 +1,187 @@
|
||||
'''
|
||||
---------------------------------------------------------
|
||||
NWS Alerts
|
||||
---------------------------------------------------------
|
||||
VERSION: 0.0.2
|
||||
Forum: https://community.home-assistant.io/t/severe-weather-alerts-from-the-us-national-weather-service/71853
|
||||
|
||||
API Documentation
|
||||
---------------------------------------------------------
|
||||
https://www.weather.gov/documentation/services-web-api
|
||||
https://forecast-v3.weather.gov/documentation
|
||||
---------------------------------------------------------
|
||||
'''
|
||||
|
||||
import requests
|
||||
import logging
|
||||
import voluptuous as vol
|
||||
from datetime import timedelta
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import CONF_NAME, ATTR_ATTRIBUTION
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import Throttle
|
||||
|
||||
|
||||
API_ENDPOINT = 'https://api.weather.gov'
|
||||
USER_AGENT = 'Home Assistant'
|
||||
DEFAULT_ICON = 'mdi:alert'
|
||||
MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=1)
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
DEFAULT_NAME = 'NWS Alerts'
|
||||
CONF_ZONE_ID = 'zone_id'
|
||||
ZONE_ID = ''
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Required(CONF_ZONE_ID): cv.string,
|
||||
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
|
||||
})
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
"""Setup the sensor platform."""
|
||||
name = config.get(CONF_NAME, DEFAULT_NAME)
|
||||
zone_id = config.get(CONF_ZONE_ID)
|
||||
add_devices([NWSAlertSensor(name, zone_id)])
|
||||
|
||||
|
||||
class NWSAlertSensor(Entity):
|
||||
"""Representation of a Sensor."""
|
||||
|
||||
def __init__(self, name, zone_id):
|
||||
"""Initialize the sensor."""
|
||||
self._name = name
|
||||
self._icon = DEFAULT_ICON
|
||||
self._state = 0
|
||||
self._event = None
|
||||
self._display_desc = None
|
||||
self._spoken_desc = None
|
||||
self._zone_id = zone_id.replace(' ', '')
|
||||
self.update()
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Return the name of the sensor."""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
"""Return the icon to use in the frontend, if any."""
|
||||
return self._icon
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
"""Return the state of the sensor."""
|
||||
return self._state
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return the state message."""
|
||||
attributes = {"title": self._event,
|
||||
"display_desc": self._display_desc,
|
||||
"spoken_desc": self._spoken_desc
|
||||
}
|
||||
|
||||
return attributes
|
||||
|
||||
@Throttle(MIN_TIME_BETWEEN_UPDATES)
|
||||
def update(self):
|
||||
"""Fetch new state data for the sensor.
|
||||
This is the only method that should fetch new data for Home Assistant.
|
||||
"""
|
||||
values = self.get_state()
|
||||
self._state = values['state']
|
||||
self._event = values['event']
|
||||
self._display_desc = values['display_desc']
|
||||
self._spoken_desc = values['spoken_desc']
|
||||
|
||||
def get_state(self):
|
||||
values = {'state': 0,
|
||||
'event': None,
|
||||
'display_desc': None,
|
||||
'spoken_desc': None
|
||||
}
|
||||
|
||||
headers = {'User-Agent': USER_AGENT,
|
||||
'Accept': 'application/ld+json'
|
||||
}
|
||||
|
||||
url = '%s/alerts/active/count' % API_ENDPOINT
|
||||
r = requests.get(url, headers=headers)
|
||||
_LOGGER.debug("getting state, %s", url)
|
||||
if r.status_code == 200:
|
||||
if 'zones' in r.json():
|
||||
for zone in self._zone_id.split(','):
|
||||
if zone in r.json()['zones']:
|
||||
values = self.get_alerts()
|
||||
break
|
||||
|
||||
return values
|
||||
|
||||
def get_alerts(self):
|
||||
values = {'state': 0,
|
||||
'event': None,
|
||||
'display_desc': None,
|
||||
'spoken_desc': None
|
||||
}
|
||||
|
||||
headers = {'User-Agent': USER_AGENT,
|
||||
'Accept': 'application/geo+json'
|
||||
}
|
||||
url = '%s/alerts/active?zone=%s' % (API_ENDPOINT, self._zone_id)
|
||||
r = requests.get(url, headers=headers)
|
||||
_LOGGER.debug("getting alert, %s", url)
|
||||
if r.status_code == 200:
|
||||
events = []
|
||||
headlines = []
|
||||
display_desc = ''
|
||||
spoken_desc = ''
|
||||
features = r.json()['features']
|
||||
for alert in features:
|
||||
event = alert['properties']['event']
|
||||
if 'NWSheadline' in alert['properties']['parameters']:
|
||||
headline = alert['properties']['parameters']['NWSheadline'][0]
|
||||
else:
|
||||
headline = event
|
||||
|
||||
description = alert['properties']['description']
|
||||
instruction = alert['properties']['instruction']
|
||||
|
||||
if event in events:
|
||||
continue
|
||||
|
||||
events.append(event)
|
||||
headlines.append(headline)
|
||||
|
||||
if display_desc != '':
|
||||
display_desc += '\n\n'
|
||||
|
||||
display_desc += '<b>%s</b>\n%s\n%s\n%s' % (event, headline, description, instruction)
|
||||
|
||||
if headlines:
|
||||
num_headlines = len(headlines)
|
||||
i = 0
|
||||
for headline in headlines:
|
||||
i += 1
|
||||
if spoken_desc != '':
|
||||
if i == num_headlines:
|
||||
spoken_desc += ' and a '
|
||||
else:
|
||||
spoken_desc += ', a '
|
||||
|
||||
spoken_desc += headline
|
||||
|
||||
if len(events) > 0:
|
||||
event_str = ''
|
||||
for item in events:
|
||||
if event_str != '':
|
||||
event_str += ' - '
|
||||
event_str += item
|
||||
|
||||
values['state'] = len(events)
|
||||
values['event'] = event_str
|
||||
values['display_desc'] = display_desc
|
||||
values['spoken_desc'] = spoken_desc
|
||||
|
||||
return values
|
||||
|
329
config/customize.yaml
Executable file
329
config/customize.yaml
Executable file
@@ -0,0 +1,329 @@
|
||||
### CUSTOMIZE ###
|
||||
|
||||
# Speedtest #
|
||||
sensor.speedtest_ping:
|
||||
icon: mdi:speedometer
|
||||
friendly_name: Ping
|
||||
sensor.speedtest_download:
|
||||
icon: mdi:download
|
||||
friendly_name: Download
|
||||
sensor.speedtest_upload:
|
||||
icon: mdi:upload
|
||||
friendly_name: Upload
|
||||
|
||||
|
||||
# Weather #
|
||||
sensor.dark_sky_summary:
|
||||
icon: mdi:leaf
|
||||
friendly_name: Conditions
|
||||
sensor.dark_sky_temperature:
|
||||
icon: mdi:thermometer-lines
|
||||
friendly_name: 'Outdoor Temperature'
|
||||
sensor.dark_sky_apparent_temperature:
|
||||
icon: mdi:thermometer-lines
|
||||
friendly_name: 'Apparent Temperature'
|
||||
sensor.dark_sky_precip:
|
||||
icon: mdi:weather-pouring
|
||||
friendly_name: Precipitation
|
||||
sensor.dark_sky_precip_probability:
|
||||
icon: mdi:weather-pouring
|
||||
friendly_name: Precipitation Chance
|
||||
sensor.dark_sky_precip_intensity:
|
||||
icon: mdi:weather-pouring
|
||||
friendly_name: Precip Intensity
|
||||
sensor.dark_sky_humidity:
|
||||
icon: mdi:water-percent
|
||||
friendly_name: 'Outdoor Humidity'
|
||||
sensor.dark_sky_cloud_coverage:
|
||||
icon: mdi:weather-cloudy
|
||||
friendly_name: Cloud Coverage
|
||||
sensor.dark_sky_nearest_storm_distance:
|
||||
icon: mdi:weather-lightning
|
||||
friendly_name: Nearest Storm Distance
|
||||
sensor.dark_sky_nearest_storm_bearing:
|
||||
icon: mdi:compass-outline
|
||||
friendly_name: Nearest Storm Bearing
|
||||
sensor.dark_sky_wind_speed:
|
||||
icon: mdi:weather-windy
|
||||
friendly_name: Wind Speed
|
||||
sensor.pws_wind_mph:
|
||||
icon: mdi:weather-windy
|
||||
friendly_name: Wind Speed
|
||||
sensor.pws_wind_gust_mph:
|
||||
icon: mdi:weather-windy
|
||||
friendly_name: Wind Gusts
|
||||
sensor.pws_precip_today_in:
|
||||
icon: mdi:gauge
|
||||
friendly_name: Rain Gauge
|
||||
sensor.dark_sky_wind_bearing:
|
||||
icon: mdi:compass-outline
|
||||
friendly_name: Wind Direction
|
||||
sensor.pws_wind_dir:
|
||||
icon: mdi:compass-outline
|
||||
friendly_name: Wind Direction
|
||||
sensor.dark_sky_ozone:
|
||||
icon: mdi:cloud
|
||||
sensor.dark_sky_pressure:
|
||||
icon: mdi:weight
|
||||
friendly_name: Pressure
|
||||
sensor.dark_sky_dew_point:
|
||||
icon: mdi:thermometer
|
||||
friendly_name: Dew Point
|
||||
sensor.dark_sky_visability:
|
||||
icon: mdi:eye-outline
|
||||
friendly_name: Visability
|
||||
sensor.dark_sky_daily_low_temperature:
|
||||
friendly_name: Todays Low
|
||||
icon: thermometer-lines
|
||||
sensor.dark_sky_daily_high_temperature:
|
||||
friendly_name: Todays High
|
||||
icon: thermometer-lines
|
||||
sensor.dark_sky_daily_max_precip_intensity:
|
||||
friendly_name: Rain Intensity
|
||||
icon: gauge
|
||||
|
||||
# Jeff #
|
||||
|
||||
sensor.jeffrey_location:
|
||||
entity_picture: !secret JEFF_ICON
|
||||
friendly_name: Jeff
|
||||
sensor.jeff_location:
|
||||
entity_picture: !secret JEFF_ICON
|
||||
sensor.jeff_destination:
|
||||
icon: mdi:google-maps
|
||||
name: "Jeffs Destination"
|
||||
device_tracker.jeffreystonesiphone:
|
||||
entity_picture: !secret JEFF_ICON
|
||||
friendly_name: Jeff
|
||||
sensor.jeff_iphone_batt:
|
||||
friendly_name: "Jeff's iPhone Battery"
|
||||
sensor.jeff_ett_home:
|
||||
friendly_name: "Jeff's ETA Home"
|
||||
icon: mdi:car
|
||||
device_tracker.jeffreystonesipad:
|
||||
icon: mdi:tablet-ipad
|
||||
friendly_name: "Jeff's iPad"
|
||||
device_tracker.jeffreysmbp:
|
||||
icon: mdi:laptop-mac
|
||||
friendly_name: "Jeff's MacBook"
|
||||
device_tracker.jstonemac:
|
||||
icon: mdi:laptop-mac
|
||||
friendly_name: "Jeff's Work Mac"
|
||||
device_tracker.jeffreysapple_watch:
|
||||
friendly_name: "Jeff's Watch"
|
||||
icon: mdi:watch
|
||||
|
||||
|
||||
# Kat ##
|
||||
device_tracker.iphone:
|
||||
entity_picture: !secret KAT_ICON
|
||||
friendly_name: Kat
|
||||
sensor.kat_location:
|
||||
entity_picture: !secret KAT_ICON
|
||||
sensor.kat_iphone_batt:
|
||||
friendly_name: "Kat's iPhone Battery"
|
||||
device_tracker.katherinesipad:
|
||||
icon: mdi:tablet-ipad
|
||||
friendly_name: "Kat's Ipad"
|
||||
device_tracker.katherinesmini:
|
||||
icon: mdi:desktop-mac
|
||||
friendly_name: "Kat's Mini"
|
||||
sensor.kat_ett_home:
|
||||
friendly_name: "Kat's ETA Home"
|
||||
icon: mdi:car
|
||||
sensor.kat_destination:
|
||||
icon: mdi:google-maps
|
||||
name: "Jeffs Destination"
|
||||
|
||||
# Skylar
|
||||
|
||||
sensor.skylar_location:
|
||||
entity_picture: !secret SKYLAR_ICON
|
||||
|
||||
# Device ##
|
||||
device_tracker.gateway2f3bca:
|
||||
icon: mdi:nest-thermostat
|
||||
friendly_name: Honeywell
|
||||
sensor.appletv:
|
||||
icon: mdi:apple
|
||||
sensor.roku:
|
||||
icon: mdi:television
|
||||
sensor.xboxone:
|
||||
icon: mdi:xbox
|
||||
sensor.chromecast:
|
||||
icon: mdi:cast
|
||||
sensor.samsungtv:
|
||||
icon: mdi:television
|
||||
sensor.amazon_dot_lr:
|
||||
icon: mdi:amazon
|
||||
sensor.amazon_dot_kn:
|
||||
icon: mdi:amazon
|
||||
sensor.honeywell:
|
||||
icon: mdi:thermostat
|
||||
sensor.smartthings:
|
||||
icon: mdi:router-wireless
|
||||
sensor.eero_loft:
|
||||
icon: mdi:router-wireless
|
||||
sensor.eero_livingroom:
|
||||
icon: mdi:router-wireless
|
||||
media_player.roku_5s6719003683:
|
||||
friendly_name: Roku Living Room
|
||||
icon: mdi:youtube-tv
|
||||
device_tracker.00a0dea3ed2f:
|
||||
friendly_name: Yamaha AV
|
||||
icon: mdi:surround-sound
|
||||
media_player.pn60e550_pn60e550:
|
||||
name: Samsung TV
|
||||
icon: mdi:television
|
||||
media_player.hass_speaker:
|
||||
name: AH Speaker
|
||||
icon: mdi:speaker
|
||||
media_player.yamaha_receiver_theater:
|
||||
icon: mdi:audio-video
|
||||
switch.main_theater:
|
||||
icon: mdi:audio-video
|
||||
|
||||
# Switches and Lights ##
|
||||
switch.fireplace_lights:
|
||||
icon: mdi:spotlight-beam
|
||||
switch.tower_lamp:
|
||||
icon: mdi:lightbulb
|
||||
switch.driveway_light:
|
||||
icon: mdi:lightbulb
|
||||
switch.side_door:
|
||||
icon: mdi:lightbulb
|
||||
switch.front_porch:
|
||||
icon: mdi:lightbulb
|
||||
switch.front_lamp:
|
||||
icon: mdi:lightbulb
|
||||
switch.upstairs_light:
|
||||
icon: mdi:lightbulb
|
||||
cover.garage_door:
|
||||
device_class: garage
|
||||
friendly_name: Garage Door
|
||||
homebridge_cover_type: garage_door
|
||||
switch.loft_fan:
|
||||
friendly_name: "Loft Box Fan"
|
||||
icon: mdi:fan
|
||||
switch.house_secured:
|
||||
name: House Secured
|
||||
icon: mdi:lock
|
||||
switch.vacation_mode:
|
||||
name: Vacation Mode
|
||||
icon: mdi:airplane-takeoff
|
||||
switch.guest_mode:
|
||||
name: Guest Mode
|
||||
icon: mdi:account-multiple
|
||||
switch.notifications_to_kat:
|
||||
name: Notify Katherine
|
||||
icon: mdi:telegram
|
||||
switch.notifications_to_jeff:
|
||||
name: Notify Jeff
|
||||
icon: mdi:telegram
|
||||
switch.automations:
|
||||
name: automations
|
||||
icon: mdi:home-automation
|
||||
switch.kitchen_cabinets:
|
||||
icon: mdi:lightbulb
|
||||
switch.kitchen_light_strip:
|
||||
icon: mdi:lightbulb
|
||||
switch.garage_alarm:
|
||||
name: Garage Door Alarm
|
||||
icon: mdi:alert
|
||||
input_select.trash_pickup:
|
||||
name: Trash Pickup
|
||||
icon: mdi:delete-variant
|
||||
input_select.recycle_pickup:
|
||||
name: Recycle Pickup
|
||||
icon: mdi:delete-variant
|
||||
switch.trash_notification:
|
||||
name: Trash Notifications
|
||||
icon: mdi:telegram
|
||||
switch.master_bedroom_fan:
|
||||
icon: mdi:fan
|
||||
switch.incense:
|
||||
icon: mdi:flower
|
||||
switch.christmas_tree_lights:
|
||||
icon: mdi:lightbulb
|
||||
switch.christmas_lights:
|
||||
icon: mdi:lightbulb
|
||||
switch.rainbow_light:
|
||||
icon: mdi:lightbulb
|
||||
|
||||
# Travel Times ##
|
||||
sensor.home_to_summit:
|
||||
friendly_name: "Home to Summit"
|
||||
icon: mdi:car
|
||||
sensor.home_to_zoo:
|
||||
friendly_name: "Home to Zoo Atlanta"
|
||||
icon: mdi:car
|
||||
|
||||
|
||||
# Various Sensors ##
|
||||
sensor.kitchen_fire:
|
||||
name: Kitchen Smoke Detector
|
||||
icon: mdi:tower-fire
|
||||
sensor.smoke_kitchen:
|
||||
icon: mdi:fire
|
||||
sensor.family_status:
|
||||
icon: mdi:home
|
||||
name: Family Status
|
||||
sensor.ha_uptime:
|
||||
friendly_name: HA Uptime
|
||||
icon: mdi:clock-start
|
||||
sensor.installed_version:
|
||||
friendly_name: Installed
|
||||
icon: mdi:folder-download
|
||||
sensor.lets_encrypt_expiration:
|
||||
friendly_name: Lets Encrypt Expiration
|
||||
icon: mdi:timelapse
|
||||
sensor.current_ha_version:
|
||||
friendly_name: Latest Release
|
||||
icon: mdi:github-circle
|
||||
sensor.connected_clients:
|
||||
friendly_name: Connections
|
||||
icon: mdi:lan-connect
|
||||
zwave.aeotec_zw090_zstick_gen5_us:
|
||||
friendly_name: Zwave USB Hub
|
||||
sensor.ha_v2db:
|
||||
friendly_name: HA Database
|
||||
icon: mdi:file
|
||||
sensor.ha_log:
|
||||
friendly_name: HA Log
|
||||
icon: mdi:file
|
||||
sensor.accurite_back_porch_temperature:
|
||||
friendly_name: Back Porch Temp
|
||||
icon: mdi:thermometer
|
||||
unit_of_measurement: '°F'
|
||||
sensor.accurite_back_porch_humidity:
|
||||
friendly_name: Back Porch Humidity
|
||||
icon: mdi:water-percent
|
||||
unit_of_measurement: '%'
|
||||
sensor.accurite_garage_temperature:
|
||||
friendly_name: Garage Temp
|
||||
icon: mdi:thermometer
|
||||
unit_of_measurement: '°F'
|
||||
sensor.accurite_garage_humidity:
|
||||
friendly_name: Garage Humidity
|
||||
icon: mdi:water-percent
|
||||
unit_of_measurement: '%'
|
||||
binary_sensor.garage_dome_sensor:
|
||||
friendly_name: Garage Motion
|
||||
sensor.washer_power:
|
||||
friendly_name: Washer Power
|
||||
icon: mdi:power-plug
|
||||
unit_of_measurement: 'w'
|
||||
sensor.washer:
|
||||
icon: mdi:power-plug
|
||||
binary_sensor.dome_doorwindow_sensor_sensor:
|
||||
device_class: Door
|
||||
sensor.security_protocol:
|
||||
icon: mdi:security
|
||||
sensor.notification_mode:
|
||||
icon: mdi:bell
|
||||
|
||||
device_tracker.life360_jeffrey_stone:
|
||||
friendly_name: Jeffrey
|
||||
|
||||
device_tracker.life360_kat_stone:
|
||||
friendly_name: Katherine
|
63
config/groups.yaml
Executable file
63
config/groups.yaml
Executable file
@@ -0,0 +1,63 @@
|
||||
### Views ###
|
||||
default_view:
|
||||
name: Home
|
||||
view: yes
|
||||
icon: mdi:home
|
||||
entities:
|
||||
|
||||
|
||||
|
||||
|
||||
#################################################################################
|
||||
### Grops ###
|
||||
|
||||
House:
|
||||
control: hidden
|
||||
entities:
|
||||
- sensor.notification_mode
|
||||
- input_boolean.guest_mode
|
||||
- input_boolean.vacation_mode
|
||||
|
||||
Family:
|
||||
- binary_sensor.jeffrey_presence
|
||||
- binary_sensor.kat_presence
|
||||
|
||||
|
||||
House Conditions:
|
||||
- climate.first_floor
|
||||
- sensor.accurite_back_porch_temperature
|
||||
- sensor.accurite_back_porch_humidity
|
||||
- sensor.accurite_garage_temperature
|
||||
- sensor.accurite_garage_humidity
|
||||
|
||||
External Doors:
|
||||
- binary_sensor.side_door_contact_2
|
||||
- binary_sensor.front_door_contact_2
|
||||
- binary_sensor.back_door_contact_2
|
||||
- binary_sensor.laundry_room_door_contact_2
|
||||
- binary_sensor.garage_door_contact_2
|
||||
|
||||
Garage Doors:
|
||||
- binary_sensor.side_door_contact_2
|
||||
- binary_sensor.side_door
|
||||
- binary_sensor.garage_door_contact_2
|
||||
- binary_sensor.garage_door
|
||||
|
||||
Internal Doors:
|
||||
- binary_sensor.attic_door_contact_2
|
||||
|
||||
Disney Audio:
|
||||
- input_boolean.tiki_room_audio
|
||||
- input_boolean.happy_ever_after_show
|
||||
- input_boolean.haunted_mansion
|
||||
- input_boolean.boo_to_you_show
|
||||
- input_boolean.spaceship_earth_ride
|
||||
- input_boolean.mk_loop
|
||||
- input_boolean.illuminations
|
||||
- input_boolean.boo_to_you
|
||||
- input_boolean.happy_ever_after
|
||||
|
||||
rgb_lr:
|
||||
- light.0xb0ce18140003608a_light_2
|
||||
- light.0xb0ce181400051b4c_light_2
|
||||
- light.0xb0ce181400051072_light_2
|
148
config/input_boolean.yaml
Executable file
148
config/input_boolean.yaml
Executable file
@@ -0,0 +1,148 @@
|
||||
automations:
|
||||
name: Automations
|
||||
icon: mdi:home-automation
|
||||
trash_notification:
|
||||
name: Trash Notification
|
||||
icon: mdi:telegram
|
||||
welcome_greeting:
|
||||
name: Welcome Greeting
|
||||
icon: mdi:speaker-wireless
|
||||
lockdown_notification:
|
||||
name: Lockdown Notifications
|
||||
icon: mdi:speaker-wireless
|
||||
garage_notifications:
|
||||
name: Garage Notifications
|
||||
icon: mdi:speaker-wireless
|
||||
tornado_alarm:
|
||||
name: Tornado Alarm
|
||||
icon: mdi:speaker-wireless
|
||||
tstorm_alarm:
|
||||
name: T-Storm Alarm
|
||||
icon: mdi:speaker-wireless
|
||||
text_notify_jeff:
|
||||
name: Send Jeff Texts
|
||||
icon: mdi:telegram
|
||||
text_notify_kat:
|
||||
name: Send Kat Texts
|
||||
icon: mdi:telegram
|
||||
audible_notifications:
|
||||
name: Audible Notifications
|
||||
icon: mdi:speaker-wireless
|
||||
presence_notifications_jeff:
|
||||
name: Send Jeff Presence Texts
|
||||
icon: mdi:telegram
|
||||
presence_notifications_kat:
|
||||
name: Send Kat Presence Texts
|
||||
icon: mdi:telegram
|
||||
kat_heading_home:
|
||||
name: Kat Heading Home
|
||||
icon: mdi:car
|
||||
jeff_heading_home:
|
||||
name: Jeff Heading Home
|
||||
icon: mdi:car
|
||||
jeff_traffic_alerts:
|
||||
name: Jeff Traffic Alerts
|
||||
icon: mdi:bell-plus
|
||||
jeff_traffic_alert_home:
|
||||
name: Jeff Traffic Alert Home
|
||||
icon: mdi:traffic-light
|
||||
tornado_watch:
|
||||
name: Tornado Watch
|
||||
icon: mdi:message-alert
|
||||
kat_travel_monitor:
|
||||
name: Kat Travel Monitor
|
||||
icon: mdi:car
|
||||
jeff_travel_monitor:
|
||||
name: Jeff Travel Monitor
|
||||
icon: mdi:car
|
||||
notifications_audio:
|
||||
name: Audio Notifications
|
||||
icon: mdi:speaker-wireless
|
||||
text_notifications:
|
||||
name: Text Notifications
|
||||
icon: mdi:telegram
|
||||
presence_text_notifications:
|
||||
name: Presence Texts
|
||||
icon: mdi:telegram
|
||||
presence_audio_notifications:
|
||||
name: Presence Audio
|
||||
icon: mdi:speaker-wireless
|
||||
weather_reports:
|
||||
name: Weather Info
|
||||
traffic_reports:
|
||||
name: traffic_reports
|
||||
sun_reports:
|
||||
name: Sun Reports
|
||||
new_ha_announcement:
|
||||
name: New HA Announcement
|
||||
icon: mdi:twitter
|
||||
showing_now:
|
||||
name: Showing Now
|
||||
icon: mdi:popcorn
|
||||
skylar_school:
|
||||
name: Skylar at School
|
||||
|
||||
|
||||
#####################
|
||||
# Chore List
|
||||
#####################
|
||||
# Everyday
|
||||
feed_fish:
|
||||
name: Feed Fish
|
||||
icon: mdi:fishbowl
|
||||
wash_dishes:
|
||||
name: Wash Dishes
|
||||
icon: mdi:dishwasher
|
||||
|
||||
# Monday | Wednesday | Friday
|
||||
clean_litterbox:
|
||||
name: Clean Litterbox
|
||||
icon: mdi:cat
|
||||
|
||||
# Monday
|
||||
clean_towel_day:
|
||||
name: Clean Towel Day
|
||||
|
||||
|
||||
# Tuesday
|
||||
vacuum:
|
||||
name: Vavuum Living Room
|
||||
|
||||
dust:
|
||||
name: Dust
|
||||
|
||||
mop_kitchen:
|
||||
name: Mop Kitchen
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Friday
|
||||
clean_sheet_day:
|
||||
name: Clean Sheet Day
|
||||
|
||||
|
||||
|
||||
# Weekend
|
||||
clean_kitchen:
|
||||
name: Clean Kitchen
|
||||
clean_bathrooms:
|
||||
name: Clean Bathrooms
|
||||
mow_yard:
|
||||
name: Mow Yard
|
||||
|
||||
# Sunday
|
||||
menu_day:
|
||||
name: Menu Day
|
||||
|
||||
# Monthly
|
||||
wash_mattress_protector:
|
||||
name: Wash Mattress Protector
|
||||
|
||||
clean_fish_tank:
|
||||
name: Clean Fish Tank
|
||||
|
||||
heartworm:
|
||||
name: Heartworm
|
||||
icon: mdi:dog-side
|
40
config/input_datetime.yaml
Executable file
40
config/input_datetime.yaml
Executable file
@@ -0,0 +1,40 @@
|
||||
both_date_and_time:
|
||||
name: Input with both date and time
|
||||
has_date: true
|
||||
has_time: true
|
||||
only_date:
|
||||
name: Input with only date
|
||||
has_date: true
|
||||
has_time: false
|
||||
outisde_light_delay:
|
||||
name: Outside Light Delay
|
||||
has_date: false
|
||||
has_time: true
|
||||
announcement_delay:
|
||||
name: Announcement Delay
|
||||
has_date: false
|
||||
has_time: true
|
||||
coffee_time:
|
||||
name: Coffee Time
|
||||
has_date: false
|
||||
has_time: true
|
||||
good_morning:
|
||||
name: Good Morning
|
||||
has_date: false
|
||||
has_time: true
|
||||
skylar_wakeup_call:
|
||||
name: Skylar Wakeup
|
||||
has_date: false
|
||||
has_time: true
|
||||
christmas_show:
|
||||
name: Christmas Show
|
||||
has_date: false
|
||||
has_time: true
|
||||
halloween_show:
|
||||
name: Halloween Show
|
||||
has_date: false
|
||||
has_time: true
|
||||
good_night_routine:
|
||||
name: Good Night Routine
|
||||
has_date: false
|
||||
has_time: true
|
20
config/input_select.yaml
Executable file
20
config/input_select.yaml
Executable file
@@ -0,0 +1,20 @@
|
||||
trash_pickup:
|
||||
name: Trash Pickup
|
||||
options:
|
||||
- Monday
|
||||
- Tuesday
|
||||
- Wednesday
|
||||
- Thursday
|
||||
- Friday
|
||||
initial: Tuesday
|
||||
icon: mdi:delete-variant
|
||||
recycle_pickup:
|
||||
name: Recycle Pickup
|
||||
options:
|
||||
- Monday
|
||||
- Tuesday
|
||||
- Wednesday
|
||||
- Thursday
|
||||
- Friday
|
||||
initial: Tuesday
|
||||
icon: mdi:delete-variant
|
82
config/lights.yaml
Normal file
82
config/lights.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
# Living Room
|
||||
# Sengled LED Lights
|
||||
- platform: mqtt
|
||||
name: "Tower Lamp"
|
||||
state_topic: "smartthings/Tower Lamp/switch"
|
||||
command_topic: "smartthings/Tower Lamp/switch"
|
||||
brightness_state_topic: "smartthings/Tower Lamp/level"
|
||||
brightness_command_topic: "smartthings/Tower Lamp/level"
|
||||
color_temp_command_topic: "smartthings/Tower Lamp/colorTemperature"
|
||||
color_temp_state_topic: "smartthings/Tower Lamp/colorTemperature"
|
||||
brightness_scale: 101
|
||||
payload_on: "on"
|
||||
payload_off: "off"
|
||||
retain: true
|
||||
|
||||
- platform: mqtt
|
||||
name: "Front Lamp"
|
||||
state_topic: "smartthings/Front Lamp/switch"
|
||||
command_topic: "smartthings/Front Lamp/switch"
|
||||
brightness_state_topic: "smartthings/Front Lamp/level"
|
||||
brightness_command_topic: "smartthings/Front Lamp/level"
|
||||
brightness_scale: 101
|
||||
payload_on: "on"
|
||||
payload_off: "off"
|
||||
retain: true
|
||||
|
||||
- platform: mqtt
|
||||
name: "Front Door Lamp"
|
||||
state_topic: "smartthings/Front Door Lamp/switch"
|
||||
command_topic: "smartthings/Front Door Lamp/switch"
|
||||
brightness_state_topic: "smartthings/Front Door Lamp/level"
|
||||
brightness_command_topic: "smartthings/Front Door Lamp/level"
|
||||
brightness_scale: 101
|
||||
payload_on: "on"
|
||||
payload_off: "off"
|
||||
retain: true
|
||||
|
||||
|
||||
# Bedroom
|
||||
|
||||
- platform: mqtt
|
||||
name: "Skylars Lamp"
|
||||
state_topic: "smartthings/Skylars Lamp/switch"
|
||||
command_topic: "smartthings/Skylars Lamp/switch"
|
||||
brightness_state_topic: "smartthings/Skylars Lamp/level"
|
||||
brightness_command_topic: "smartthings/Skylars Lamp/level"
|
||||
brightness_scale: 101
|
||||
payload_on: "on"
|
||||
payload_off: "off"
|
||||
retain: true
|
||||
|
||||
# Outside
|
||||
- platform: mqtt
|
||||
name: "Side Door Light"
|
||||
command_topic: "zwave2mqtt/nodeID_29/38/1/0/set"
|
||||
brightness_command_topic: "zwave2mqtt/nodeID_29/38/1/0/set"
|
||||
brightness_scale: 99
|
||||
brightness_state_topic: "zwave2mqtt/nodeID_29/38/1/0"
|
||||
on_command_type: "brightness"
|
||||
payload_off: 0
|
||||
|
||||
# Kitchen
|
||||
|
||||
- platform: mqtt
|
||||
name: "Kitchen Cabinets"
|
||||
command_topic: "zwave2mqtt/kitchen_cabinets/38/1/0/set"
|
||||
brightness_command_topic: "zwave2mqtt/kitchen_cabinets/38/1/0/set"
|
||||
brightness_scale: 99
|
||||
brightness_state_topic: "zwave2mqtt/kitchen_cabinets/38/1/0"
|
||||
on_command_type: "brightness"
|
||||
payload_off: 0
|
||||
retain: true
|
||||
|
||||
- platform: mqtt
|
||||
name: "Kitchen Cabinet Lights"
|
||||
command_topic: "zwave2mqtt/kitchen_strip/38/1/0/set"
|
||||
brightness_command_topic: "zwave2mqtt/kitchen_strip/38/1/0/set"
|
||||
brightness_scale: 99
|
||||
brightness_state_topic: "zwave2mqtt/kitchen_strip/38/1/0"
|
||||
on_command_type: "brightness"
|
||||
payload_off: 0
|
||||
retain: true
|
144
config/packages/announcements.yaml
Executable file
144
config/packages/announcements.yaml
Executable file
@@ -0,0 +1,144 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 02/19/2019
|
||||
# @package : Announcements
|
||||
# @description : Daily Announcements.
|
||||
###############################################################################
|
||||
|
||||
|
||||
###############################
|
||||
# input_datetime - So the time report automation fires can be set in the UI
|
||||
###############################
|
||||
input_datetime:
|
||||
morning_report:
|
||||
name: Morning Report
|
||||
has_date: false
|
||||
has_time: true
|
||||
nightly_report:
|
||||
name: Nightly Report
|
||||
has_date: false
|
||||
has_time: true
|
||||
skylar_morning_report:
|
||||
name: Skylar Dressed Announcement
|
||||
has_date: false
|
||||
has_time: true
|
||||
skylar_nightly_report:
|
||||
name: Skylar Bedtime Announcement
|
||||
has_date: false
|
||||
has_time: true
|
||||
|
||||
################################
|
||||
# Announcment Automation - fires at the time of the above input_datetimes
|
||||
################################
|
||||
automation:
|
||||
- id: prebed_routine
|
||||
initial_state: true
|
||||
alias: Skylar Nightly Announcements
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
call_time_annc: 1
|
||||
call_prebed_routine: 1
|
||||
|
||||
- id: nightly_report
|
||||
initial_state: true
|
||||
alias: Nightly Report
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_greeting: 1
|
||||
call_evening_greeting: 1
|
||||
call_time_annc: 1
|
||||
call_weather_alerts: 1
|
||||
call_overnight_forecast: 1
|
||||
call_upcoming_holidays: 1
|
||||
call_reminders: 1
|
||||
call_chores: 1
|
||||
|
||||
- id: good_morning_report
|
||||
alias: Good Morning Report
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_greeting: 1
|
||||
call_morning_greeting: 1
|
||||
call_time_annc: 1
|
||||
call_weather_alerts: 1
|
||||
call_todays_events: 1
|
||||
call_current_conditions_outisde: 1
|
||||
call_current_conditions_inside: 1
|
||||
call_daily_forecast: 1
|
||||
call_upcoming_birthdays: 1
|
||||
call_reminders: 1
|
||||
call_chores: 1
|
||||
- service: script.twitter_notify
|
||||
data:
|
||||
message: 'I just provided a morning briefing including weather, and traffic
|
||||
conditions to the residents of Anchorage House. '
|
||||
|
||||
- id: skylar_morning_greeting
|
||||
alias: Skylar Morning Greeting
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
condition:
|
||||
- condition: time
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
call_time_annc: 1
|
||||
call_skylar_dressed: 1
|
||||
call_school_today: 1
|
||||
call_skylar_events: 1
|
||||
call_clothes_suggestion: 1
|
||||
|
||||
- id: set_skylar_morning_report_time
|
||||
alias: set skylar morning report time
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '05:50:00'
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.skylar_morning_report
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.calendar.skylar_school.attributes.offset_reached == True %}
|
||||
06:30
|
||||
{% else %}
|
||||
07:58
|
||||
{% endif %}
|
||||
|
||||
- id: set_morning_report_time
|
||||
alias: set morning report time
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '05:50:30'
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.morning_report
|
||||
data_template:
|
||||
time: >
|
||||
{% if states.calendar.skylar_school.attributes.offset_reached == True %}
|
||||
07:00
|
||||
{% else %}
|
||||
07:45
|
||||
{% endif %}
|
1009
config/packages/disney.yaml
Executable file
1009
config/packages/disney.yaml
Executable file
File diff suppressed because it is too large
Load Diff
44
config/packages/events.yaml
Executable file
44
config/packages/events.yaml
Executable file
@@ -0,0 +1,44 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 02/19/2019
|
||||
# @package : Events
|
||||
# @description : Special Events.
|
||||
###############################################################################
|
||||
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
|
||||
|
||||
|
||||
|
83
config/packages/haunted_mansion_show.yaml
Executable file
83
config/packages/haunted_mansion_show.yaml
Executable file
@@ -0,0 +1,83 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 10/29/2019
|
||||
# @package : Haunted Mansion Show
|
||||
# @description : Config used to put on the Pre-show from Disney's Haunted Mansion in the living room
|
||||
###############################################################################
|
||||
|
||||
input_boolean:
|
||||
haunted_mansion:
|
||||
name: Haunted Mansion
|
||||
|
||||
automation:
|
||||
# Turn on Haunted Mansion Show when input_boolean is flipped on
|
||||
- id: haunted_mansion_on
|
||||
alias: Haunted Mansion On
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.haunted_mansion
|
||||
to: 'on'
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.haunted_mansion_start
|
||||
# Turn off Haunted Mansion Show when input_boolean is flipped off
|
||||
- id: haunted_mansion_off
|
||||
alias: Haunted Mansion Off
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.haunted_mansion
|
||||
to: 'off'
|
||||
action:
|
||||
- service: script.kill_this_ride
|
||||
- service: media_player.media_stop
|
||||
entity_id: media_player.ha_speaker
|
||||
|
||||
script:
|
||||
haunted_mansion_start:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: input_boolean.audible_notifications
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: sensor.family_status
|
||||
state: Home
|
||||
- service: shell_command.normal_vol
|
||||
- service: shell_command.haunted_mansion_preshow_full
|
||||
- service: light.turn_on
|
||||
entity_id: group.rgb_lr
|
||||
data:
|
||||
rgb_color: [255,255,255]
|
||||
- delay: 00:01:06
|
||||
- service: light.turn_on
|
||||
entity_id: group.rgb_lr
|
||||
data:
|
||||
rgb_color: [73,119,255]
|
||||
- delay: 00:00:15
|
||||
- service: light.turn_on
|
||||
entity_id: group.rgb_lr
|
||||
data:
|
||||
brightness_pct: 25
|
||||
- delay: 00:00:37
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.rail_lights
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.rail_lights
|
||||
- delay: 00:00:02
|
||||
- service: scene.turn_on
|
||||
data:
|
||||
entity_id: scene.haunted_lights_out
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.rail_lights
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.rail_lights
|
||||
- delay: 00:00:10
|
||||
- service: light.turn_on
|
||||
entity_id: group.rgb_lr
|
||||
data:
|
||||
rgb_color: [255,255,255]
|
||||
brightness_pct: 25
|
||||
- delay:
|
||||
seconds: 160
|
||||
|
211
config/packages/holidays.yaml
Executable file
211
config/packages/holidays.yaml
Executable file
@@ -0,0 +1,211 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 02/19/2019
|
||||
# @package : Holidays
|
||||
# @description : Holiday Specific.
|
||||
#
|
||||
# I'm not sure where I got this, but it leverages a python script: https://github.com/thejeffreystone/home-assistant-configuration/blob/master/python_scripts/special_events.py
|
||||
#
|
||||
# To create a sensor just create an automation to fire around midnight.
|
||||
#
|
||||
# automation:
|
||||
# - id: refresh_holioday_sensors
|
||||
# alias: Refresh Holiday sensors
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: time
|
||||
# at: '00:00:07'
|
||||
# - platform: homeassistant
|
||||
# event: start
|
||||
# action:
|
||||
# - service: python_script.special_events
|
||||
# data:
|
||||
# name: Christmas
|
||||
# type: holiday
|
||||
# date: 25/12/2001
|
||||
#
|
||||
# Where Name equals the name of the event, type is the type of event, and date is the date in DD/MM/YYYY format
|
||||
#
|
||||
# Year only matters if your want to take advantage fo the years attribute which will tell you have many years since the event. Useful
|
||||
# with birthdays and anniversaries.
|
||||
#
|
||||
# I use the Following types:
|
||||
# birthday
|
||||
# anniversary
|
||||
# holiday
|
||||
# trip
|
||||
#
|
||||
# The type will be used in the name of the sensor it creates. For example:
|
||||
# sensor.trip_camping
|
||||
# sensor.birthday_jeff
|
||||
# sensor.holiday_christmas
|
||||
#
|
||||
# The state of the sensor will be the days until the event. For birthdays and anniversaries it will never be more than 365.
|
||||
# For example {{ states.sensor.birthday_jeff.state }} will be the number of days until my next birthday.
|
||||
# And {{ states.sensor.birthday_jeff.attributes.years }} will be my age, or the number of years since my birth (if you put the real year in)
|
||||
# For events with a year in the future, the state will be number of days to that exact moment in time.
|
||||
#
|
||||
###############################################################################
|
||||
input_boolean:
|
||||
this_is_halloween:
|
||||
name: This is Halloween
|
||||
haunted_sounds:
|
||||
name: Haunted Sounds
|
||||
|
||||
automation:
|
||||
- id: refresh_holioday_sensors
|
||||
alias: Refresh Holiday sensors
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '00:00:07'
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: python_script.special_events
|
||||
data:
|
||||
name: Christmas
|
||||
type: holiday
|
||||
date: 25/12/2001
|
||||
- service: python_script.special_events
|
||||
data:
|
||||
name: Halloween
|
||||
type: holiday
|
||||
date: 31/10/2001
|
||||
|
||||
- id: this_is_halloween_on
|
||||
alias: This is Halloween On
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.this_is_halloween
|
||||
to: 'on'
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.this_is_halloween
|
||||
|
||||
- id: haunted_sounds_on
|
||||
alias: Haunted Sounds On
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.haunted_sounds
|
||||
to: 'on'
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.haunted_sounds
|
||||
|
||||
- id: haunted_sounds_off
|
||||
alias: Haunted Sounds Off
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.haunted_sounds
|
||||
to: 'off'
|
||||
action:
|
||||
- service: script.turn_off
|
||||
entity_id: script.haunted_sounds
|
||||
|
||||
- id: this_is_halloween_off
|
||||
alias: This is Halloween Off
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.this_is_halloween
|
||||
to: 'off'
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.kill_this_ride
|
||||
- service: media_player.media_stop
|
||||
entity_id: media_player.ha_speaker
|
||||
- id: this_is_halloween
|
||||
alias: This is Halloween
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.halloween_show', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: calendar.holidays_in_united_states
|
||||
state: "on"
|
||||
- condition: template
|
||||
value_template: >
|
||||
{%- set event=states.calendar.holidays_in_united_states.attributes.message %}
|
||||
{%- if event == 'Halloween' %}
|
||||
true
|
||||
{%- endif -%}
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.this_is_halloween
|
||||
|
||||
- id: operation_haunted_house
|
||||
alias: Operation Haunted House
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.halloween_show', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: calendar.holidays_in_united_states
|
||||
state: "on"
|
||||
- condition: template
|
||||
value_template: >
|
||||
{%- set event=states.calendar.holidays_in_united_states.attributes.message %}
|
||||
{%- if event == 'Halloween' %}
|
||||
true
|
||||
{%- endif -%}
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: input_boolean.haunted_sounds
|
||||
|
||||
script:
|
||||
|
||||
haunted_sounds:
|
||||
sequence:
|
||||
- delay: 00:05:00
|
||||
- service: shell_command.haunted_scream
|
||||
- delay: 00:07:06
|
||||
- service: shell_command.haunted_leotta
|
||||
- delay: 00:02:36
|
||||
- service: shell_command.haunted_raven
|
||||
- delay: 00:04:03
|
||||
- service: shell_command.haunted_harp
|
||||
- delay: 00:01:40
|
||||
- service: shell_command.haunted_door
|
||||
- delay: 00:03:33
|
||||
- service: shell_command.haunted_howling
|
||||
- delay: 00:04:03
|
||||
- service: shell_command.haunted_laugh2
|
||||
- delay: 00:03:56
|
||||
- service: shell_command.haunted_seance_horn
|
||||
- delay: 00:08:00
|
||||
- service: shell_command.haunted_piano
|
||||
- delay: 00:03:10
|
||||
- service: shell_command.haunted_clock
|
||||
- delay: 00:07:33
|
||||
- service: shell_command.haunted_ballroom
|
||||
- delay: 00:03:18
|
||||
- service: shell_command.haunted_door2
|
||||
- delay: 00:05:00
|
||||
- service: shell_command.haunted_bells
|
||||
- delay: 00:02:18
|
||||
- service: shell_command.haunted_laugh
|
||||
- delay: 00:06:36
|
||||
- service: shell_command.haunted_chains
|
||||
|
||||
|
||||
|
||||
sensor:
|
||||
- platform: rest
|
||||
name: Halloween Countdown
|
||||
resource: !secret WA_HALLOWEEN
|
||||
value_template: "{{ (value|replace(' days', '')) | int }}"
|
||||
unit_of_measurement: Days
|
||||
scan_interval: 43200
|
||||
|
||||
- platform: rest
|
||||
name: Christmas Countdown
|
||||
resource: !secret WA_XMAS
|
||||
value_template: "{{ (value|replace(' days', '')) | int }}"
|
||||
unit_of_measurement: Days
|
||||
scan_interval: 43200
|
23
config/packages/jarvis.yaml
Executable file
23
config/packages/jarvis.yaml
Executable file
@@ -0,0 +1,23 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 07/09/2019
|
||||
# @package : Jarvis
|
||||
# @description : Brining some Jarvis to Home Assistant
|
||||
###############################################################################
|
||||
|
||||
automation:
|
||||
|
||||
|
||||
script:
|
||||
activate_house_party_protocol:
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.house_party_protocol
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
speech_message: >
|
||||
{{ [
|
||||
"Anchorage House has been configured for a House Party.",
|
||||
"Incense has been turned on.",
|
||||
"I have enabled house party protocol."
|
||||
] | random }}
|
1062
config/packages/notify.yaml
Executable file
1062
config/packages/notify.yaml
Executable file
File diff suppressed because it is too large
Load Diff
448
config/packages/presence.yaml
Executable file
448
config/packages/presence.yaml
Executable file
@@ -0,0 +1,448 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 02/19/2019
|
||||
# @package : Presence
|
||||
# @description : A Collection of Presence Related Trackers and Sensors
|
||||
###############################################################################
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
jeff_location:
|
||||
friendly_name: "Jeff's Current Location"
|
||||
unit_of_measurement: ''
|
||||
value_template: >-
|
||||
{%- if is_state('person.jeffrey', 'not_home') %}
|
||||
{%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %}
|
||||
Flue Network
|
||||
{%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %}
|
||||
Flue Network
|
||||
{% else %}
|
||||
Lost
|
||||
{%- endif %}
|
||||
{% elif is_state('person.jeffrey', 'Sprouts') %}
|
||||
Grocery Store
|
||||
{% elif is_state('person.jeffrey', 'Kroger1') %}
|
||||
Grocery Store
|
||||
{% elif is_state('person.jeffrey', 'Kroger2') %}
|
||||
Grocery Store
|
||||
{% elif is_state('person.jeffrey', 'Home Depot') %}
|
||||
Home Improvement Store
|
||||
{% elif is_state('person.jeffrey', 'Lowes') %}
|
||||
Home Improvement Store
|
||||
{% elif is_state('person.jeffrey', 'Walmart') %}
|
||||
Super Store
|
||||
{% elif is_state('person.jeffrey', 'Target') %}
|
||||
Super Store
|
||||
{% else %}
|
||||
{{ states.person.jeffrey.state }}
|
||||
{%- endif %}
|
||||
jeff_driving:
|
||||
friendly_name: "Jeff' Driving"
|
||||
unit_of_measurement: ''
|
||||
value_template: >-
|
||||
{%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %}
|
||||
on
|
||||
{% elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %}
|
||||
on
|
||||
{% else %}
|
||||
off
|
||||
{% endif %}
|
||||
- platform: template
|
||||
sensors:
|
||||
skylar_location:
|
||||
friendly_name: "Skylar's Current Location"
|
||||
unit_of_measurement: ''
|
||||
value_template: >-
|
||||
{%- if is_state('input_boolean.skylar_school', 'on')%}
|
||||
school
|
||||
{%- elif is_state('sensor.jeff_location', 'home') and is_state('sensor.kat_location', 'home') and is_state('input_boolean.skylar_school', 'off')%}
|
||||
home
|
||||
{%- elif is_state('sensor.jeff_location', 'Summit') and is_state('input_boolean.skylar_school', 'off')%}
|
||||
{{ states.sensor.kat_location.state }}
|
||||
{%- elif is_state('sensor.kat_location', 'Zoo Atlanta') and is_state('input_boolean.skylar_school', 'off')%}
|
||||
{{ states.sensor.jeff_location.state }}
|
||||
{% else %}
|
||||
Mortal Peril
|
||||
{%- endif %}
|
||||
- platform: template
|
||||
sensors:
|
||||
kat_location:
|
||||
friendly_name: "Kat's Current Location"
|
||||
unit_of_measurement: ''
|
||||
value_template: >-
|
||||
{%- if is_state('person.katherine', 'not_home') %}
|
||||
{%- if states.device_tracker.life360_kat_stone.attributes.moving == True %}
|
||||
Flue Network
|
||||
{% elif states.device_tracker.life360_kat_stone.attributes.driving == True %}
|
||||
Flue Network
|
||||
{% else %}
|
||||
Lost
|
||||
{%- endif %}
|
||||
{% elif is_state('person.katherine', 'Sprouts') %}
|
||||
Grocery Store
|
||||
{% elif is_state('person.katherine', 'Kroger1') %}
|
||||
Grocery Store
|
||||
{% elif is_state('person.katherine', 'Kroger2') %}
|
||||
Grocery Store
|
||||
{% elif is_state('person.katherine', 'Home Depot') %}
|
||||
Home Improvement Store
|
||||
{% elif is_state('person.katherine', 'Lowes') %}
|
||||
Home Improvement Store
|
||||
{% elif is_state('person.katherine', 'Walmart') %}
|
||||
Super Store
|
||||
{% elif is_state('person.katherine', 'Target') %}
|
||||
Super Store
|
||||
{% else %}
|
||||
{{ states.person.katherine.state }}
|
||||
{%- endif %}
|
||||
- platform: template
|
||||
sensors:
|
||||
kat_driving:
|
||||
friendly_name: "Kat Driving"
|
||||
unit_of_measurement: ''
|
||||
value_template: >-
|
||||
{%- if states.device_tracker.life360_kat_stone.attributes.moving == True %}
|
||||
'on'
|
||||
{% elif states.device_tracker.life360_kat_stone.attributes.driving == True %}
|
||||
'on'
|
||||
{% else %}
|
||||
'off'
|
||||
{% endif %}
|
||||
- platform: mqtt
|
||||
name: "Family Status"
|
||||
state_topic: "house/family/status"
|
||||
payload_available: "online"
|
||||
payload_not_available: "offline"
|
||||
- platform: template
|
||||
sensors:
|
||||
jeff_home:
|
||||
value_template: >-
|
||||
{{ is_state('device_tracker.jeffreystonesiphone', 'home')
|
||||
or is_state('device_tracker.hass_jeffsiphone', 'home')
|
||||
or is_state('device_tracker.life360_jeffrey_stone', 'home') }}
|
||||
- platform: template
|
||||
sensors:
|
||||
kat_home:
|
||||
value_template: >-
|
||||
{{ is_state('device_tracker.iphone', 'home')
|
||||
or is_state('device_tracker.life360_kat_stone', 'home') }}
|
||||
- platform: template
|
||||
sensors:
|
||||
family_home:
|
||||
value_template: >-
|
||||
{{ is_state('device_tracker.jeffreystonesiphone', 'home')
|
||||
or is_state('device_tracker.hass_jeffsiphone', 'home')
|
||||
or is_state('device_tracker.life360_jeffrey_stone', 'home')
|
||||
or is_state('device_tracker.iphone', 'home')
|
||||
or is_state('device_tracker.life360_kat_stone', 'home')
|
||||
or is_state('sensor.family_status', 'Home') }}
|
||||
|
||||
automation:
|
||||
- id: kat_arrives_zoo
|
||||
alias: Kat Arrives at Zoo
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: zone
|
||||
event: enter
|
||||
zone: zone.zoo_atlanta
|
||||
entity_id: person.katherine
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.kat_travel_monitor
|
||||
- service: script.ah_report
|
||||
data:
|
||||
speech_message: 'Kat has arrived at worked.'
|
||||
call_interuption: 1
|
||||
|
||||
- id: kat_leaves_zoo
|
||||
alias: Kat Leaves Zoo Notification
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: zone
|
||||
event: leave
|
||||
zone: zone.zoo_atlanta
|
||||
entity_id: person.katherine
|
||||
condition:
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.kat_travel_monitor
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
call_kat_headed_home: 1
|
||||
|
||||
- id: '1550109528753'
|
||||
alias: Jeff Is Heading Home
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: webhook
|
||||
webhook_id: jeff_heading_home
|
||||
condition: []
|
||||
action:
|
||||
- service: script.jeff_destination_home
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interurption: 1
|
||||
call_jeff_headed_home: 1
|
||||
|
||||
- id: jeff_heading_to_work
|
||||
alias: Jeff Is Heading To Work
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: webhook
|
||||
webhook_id: jeff_heading_work
|
||||
condition: []
|
||||
action:
|
||||
- service: script.jeff_destination_summit
|
||||
|
||||
- id: skylar_at_school
|
||||
alias: Skylar is at School
|
||||
trigger:
|
||||
- entity_id: device_tracker.life360_jeffrey_stone
|
||||
event: enter
|
||||
platform: zone
|
||||
zone: zone.starling
|
||||
- entity_id: device_tracker.life360_kat_stone
|
||||
event: enter
|
||||
platform: zone
|
||||
zone: zone.starling
|
||||
condition:
|
||||
condition: time
|
||||
after: '07:25:00'
|
||||
before: '08:30:00'
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.skylar_school
|
||||
initial_state: true
|
||||
|
||||
- id: skylar_left_school
|
||||
alias: Skylar left School
|
||||
trigger:
|
||||
- entity_id: device_tracker.life360_jeffrey_stone
|
||||
event: leave
|
||||
platform: zone
|
||||
zone: zone.starling
|
||||
- entity_id: device_tracker.life360_kat_stone
|
||||
event: leave
|
||||
platform: zone
|
||||
zone: zone.starling
|
||||
condition:
|
||||
condition: time
|
||||
after: '14:45:00'
|
||||
before: '15:30:00'
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.skylar_school
|
||||
initial_state: true
|
||||
|
||||
- id: family_has_arrived
|
||||
alias: Family Has arrived
|
||||
trigger:
|
||||
- entity_id: sensor.family_status
|
||||
from: Away
|
||||
platform: state
|
||||
to: Home
|
||||
- entity_id: person.jeffrey
|
||||
event: enter
|
||||
platform: zone
|
||||
zone: zone.home
|
||||
- entity_id: person.katherine
|
||||
event: enter
|
||||
platform: zone
|
||||
zone: zone.home
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.family_status
|
||||
state: Away
|
||||
action:
|
||||
- service: script.vacation_canceled
|
||||
- service: script.appliances_on
|
||||
- service: script.standby
|
||||
- service: script.washer_finished_notification_audible
|
||||
- service: alarm_control_panel.alarm_arm_home
|
||||
entity_id: alarm_control_panel.ah_base_station
|
||||
initial_state: true
|
||||
|
||||
- id: family_has_left
|
||||
alias: Family Has Left
|
||||
initial_state: true
|
||||
trigger:
|
||||
- entity_id: sensor.family_status
|
||||
from: Home
|
||||
platform: state
|
||||
to: Away
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: script.appliances_off
|
||||
- service: script.inside_all_off
|
||||
- service: script.security_check_garage
|
||||
- service: script.security_check_zones
|
||||
- service: script.lockdown
|
||||
- service: script.lockdown_issue
|
||||
- service: script.all_fans_off
|
||||
- service: alarm_control_panel.alarm_arm_away
|
||||
entity_id: alarm_control_panel.ah_base_station
|
||||
|
||||
- id: jeff_is_home
|
||||
alias: Jeff is Home
|
||||
initial_state: true
|
||||
trigger:
|
||||
- entity_id: person.jeffrey
|
||||
event: enter
|
||||
platform: zone
|
||||
zone: zone.home
|
||||
action:
|
||||
- service: script.family_is_home
|
||||
- service: script.jeff_destination_na
|
||||
- service: script.driveway_on
|
||||
- entity_id: input_boolean.jeff_travel_monitor
|
||||
service: input_boolean.turn_off
|
||||
|
||||
- id: jeff_arrives_summit
|
||||
alias: Jeff Arrives At Summit
|
||||
trigger:
|
||||
- entity_id: person.jeffrey
|
||||
event: enter
|
||||
platform: zone
|
||||
zone: zone.summit
|
||||
action:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
who: "kat"
|
||||
message: "Jeff has arrived at Summit"
|
||||
initial_state: true
|
||||
|
||||
- id: jeff_arrives_summit_notification
|
||||
alias: Notify Kat Jeff At Summit
|
||||
trigger:
|
||||
- entity_id: person.jeffrey
|
||||
event: enter
|
||||
platform: zone
|
||||
zone: zone.summit
|
||||
action:
|
||||
- service: script.jeff_destination_na
|
||||
initial_state: true
|
||||
|
||||
- id: jeff_leaves_summit
|
||||
alias: Jeff Leaves Summit
|
||||
initial_state: true
|
||||
trigger:
|
||||
- entity_id: person.jeffrey
|
||||
event: leave
|
||||
platform: zone
|
||||
zone: zone.summit
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.jeff_traffic_alert_home
|
||||
|
||||
- id: kat_is_home
|
||||
alias: Kat is Home
|
||||
initial_state: true
|
||||
trigger:
|
||||
- entity_id: person.katherine
|
||||
event: enter
|
||||
platform: zone
|
||||
zone: zone.home
|
||||
action:
|
||||
- service: script.family_is_home
|
||||
- service: script.driveway_on
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.kat_travel_monitor
|
||||
|
||||
- id: welcome_home
|
||||
alias: Welcome Home
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- person.jeffrey
|
||||
- person.katherine
|
||||
from: 'not_home'
|
||||
to: 'home'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.family_status
|
||||
state: Home
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
welcome_home: >
|
||||
{% set person = trigger.to_state.attributes.friendly_name %}
|
||||
{%- macro greeting_sentence(person) -%}
|
||||
{{ [
|
||||
person + " has arrived.",
|
||||
person + " is in the neighborhood.",
|
||||
person + " is arriving.",
|
||||
"My sensors are picking up the presence of additional humans. " ~ person +" has been identified as home.",
|
||||
person + " has finally made it home."
|
||||
] | random }}
|
||||
{%- endmacro -%}
|
||||
{{greeting_sentence(person)}}
|
||||
call_interuption: 1
|
||||
|
||||
|
||||
script:
|
||||
jeff_destination_zoo:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: jeff/driving/destination
|
||||
payload: Zoo
|
||||
retain: true
|
||||
jeff_destination_summit:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: jeff/driving/destination
|
||||
payload: Summit
|
||||
retain: true
|
||||
jeff_destination_none:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: jeff/driving/destination
|
||||
payload: none
|
||||
retain: true
|
||||
jeff_destination_na:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: jeff/driving/destination
|
||||
payload: na
|
||||
retain: true
|
||||
jeff_destination_home:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: jeff/driving/destination
|
||||
payload: Home
|
||||
retain: true
|
||||
jeff_destination_harbins:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: jeff/driving/destination
|
||||
payload: Harbins
|
||||
retain: true
|
||||
kat_destination_na:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: kat/driving/destination
|
||||
payload: na
|
||||
retain: true
|
40
config/packages/reminders.yaml
Executable file
40
config/packages/reminders.yaml
Executable file
@@ -0,0 +1,40 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 07/15/2019
|
||||
# @package : Reminders
|
||||
# @description : Autoamtions to set reminders
|
||||
###############################################################################
|
||||
|
||||
input_datetime:
|
||||
kat_pill_reminder:
|
||||
name: Kat Pill Reminder
|
||||
has_date: false
|
||||
has_time: true
|
||||
heartworm_reminder:
|
||||
name: Heartworm Reminder
|
||||
has_date: true
|
||||
has_time: false
|
||||
|
||||
automation:
|
||||
|
||||
# Massive automation to call all the reminder scripts.
|
||||
- id: turn_reminders_on
|
||||
alias: Turn Reminders On
|
||||
initial_state: true
|
||||
trigger:
|
||||
- entity_id: calendar.reminders
|
||||
from: 'off'
|
||||
platform: state
|
||||
to: 'on'
|
||||
action:
|
||||
- service: script.heartworm_on
|
||||
|
||||
|
||||
script:
|
||||
# Check to see if heartworm is the reminder in the cal
|
||||
heartworm_on:
|
||||
sequence:
|
||||
- condition: template
|
||||
value_template: '{{ states.calendar.reminders.attributes.message == "Heartworm" }}'
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.heartworm
|
420
config/packages/security.yaml
Executable file
420
config/packages/security.yaml
Executable file
@@ -0,0 +1,420 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 03/13/2019
|
||||
# @package : Security
|
||||
# @description : Everything related to security functions.
|
||||
###############################################################################
|
||||
|
||||
input_boolean:
|
||||
sentry_mode:
|
||||
name: Sentry Mode
|
||||
icon: mdi:security
|
||||
vacation_mode:
|
||||
name: Vacation Mode
|
||||
icon: mdi:airplane-takeoff
|
||||
guest_mode:
|
||||
name: Guest Mode
|
||||
icon: mdi:account-multiple
|
||||
security_alarm:
|
||||
name: Security Alarm
|
||||
icon: mdi:speaker-wireless
|
||||
fire_alarm:
|
||||
name: Fire Alarm
|
||||
icon: mdi:speaker-wireless
|
||||
garage_after_dark:
|
||||
name: Garage Open After Dark
|
||||
icon: mdi:message-alert
|
||||
lockdown_issue:
|
||||
name: Lockdown Issue
|
||||
icon: mdi:lock-reset
|
||||
security_issue:
|
||||
name: Security Issue
|
||||
icon: mdi:alert-circle-outline
|
||||
|
||||
automation:
|
||||
- id: enable_vacation_mode
|
||||
alias: Enable Vacation Mode
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.jeff_ett_home
|
||||
above: 180
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.kat_ett_home
|
||||
above: 180
|
||||
condition:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.jeff_ett_home
|
||||
above: 180
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.kat_ett_home
|
||||
above: 180
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.vacation_mode
|
||||
|
||||
- id: morning_standby
|
||||
alias: Morning Standby
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: 05:30:00
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.family_status
|
||||
state: Home
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'on'
|
||||
action:
|
||||
- service: script.standby
|
||||
|
||||
- id: nightly_lockdown
|
||||
alias: Nightly Lockdown
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '23:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: person.jeffrey
|
||||
state: home
|
||||
- condition: state
|
||||
entity_id: person.katherine
|
||||
state: home
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: script.lockdown
|
||||
|
||||
- id: garage_open_sunset
|
||||
alias: Garage Open At Sunset
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunset
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garage_door
|
||||
state: "on"
|
||||
action:
|
||||
- service: script.driveway_on
|
||||
|
||||
|
||||
- id: close_garage_lights_out
|
||||
alias: Close Garage at lights out
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '22:30:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garage_door
|
||||
state: "on"
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.security_issue
|
||||
|
||||
- id: door_chime
|
||||
alias: Door Chine
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.front_door_contact_2
|
||||
- binary_sensor.laundry_room_door_contact_2
|
||||
- binary_sensor.attic_door_contact_2
|
||||
- binary_sensor.back_door_contact_2
|
||||
from: 'off'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.audible_notifications
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: shell_command.door_chime
|
||||
- service: script.reset_ha_speaker
|
||||
initial_state: true
|
||||
|
||||
- id: door_opened_long
|
||||
alias: Door Opened Too Long
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.front_door
|
||||
- binary_sensor.laundry_room_door
|
||||
- binary_sensor.attic_door
|
||||
- binary_sensor.back_door
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
for: '00:01:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.audible_notifications
|
||||
state: 'on'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
speech_message: " the {{ trigger.to_state.attributes.friendly_name }} has been standing open for more than a minute."
|
||||
call_interuption: 1
|
||||
initial_state: true
|
||||
|
||||
- id: garage_opened_night
|
||||
alias: Garage Opened at Night
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: group.garage_doors
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: below_horizon
|
||||
action:
|
||||
- service: script.driveway_on
|
||||
initial_state: true
|
||||
|
||||
- id: garage_closed
|
||||
alias: Garage Opened at Night
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: group.garage_doors
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
action:
|
||||
- service: script.driveway_off
|
||||
initial_state: true
|
||||
|
||||
- id: security_breach_door
|
||||
alias: Security Breach Doors
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.front_door
|
||||
- binary_sensor.laundry_room_door
|
||||
- binary_sensor.back_door
|
||||
- binary_sensor.side_door
|
||||
- binary_sensor.garage_door
|
||||
from: 'off'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.sentry_mode
|
||||
state: 'on'
|
||||
action:
|
||||
- service: script.jarvis_alert
|
||||
data_template:
|
||||
message: "My security protocols are being overidden,, The {{ trigger.to_state.attributes.friendly_name }} has been opened."
|
||||
- service: script.text_alert
|
||||
data_template:
|
||||
title: "Security Alert!!"
|
||||
message: "{{ trigger.to_state.attributes.friendly_name }} has been opened."
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.security_issue
|
||||
initial_state: true
|
||||
|
||||
- id: sentry_mode_enabled
|
||||
alias: Sentry Mode Enabled Annoucement
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.sentry_mode
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
speech_message: >
|
||||
{{ [
|
||||
"Barn door protocol has been activated.",
|
||||
"Anchorage House has been secured! ",
|
||||
"Sentry Mode is active. ",
|
||||
"I am now monitoring the doors and will let you know if anyone attempts to access."
|
||||
] | random }}
|
||||
|
||||
- id: sentry_mode_disabled
|
||||
alias: Sentry Mode Disabled Annoucement
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.sentry_mode
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
speech_message: >
|
||||
{{ [
|
||||
"Barn door protocol has been deactivated.",
|
||||
"I am no longer monitoring the access points. ",
|
||||
"Sentry Mode has been switched off. "
|
||||
] | random }}
|
||||
|
||||
- id: guest_mode_feedback
|
||||
alias: Guest Mode Audio Feedback
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.guest_mode
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
speech_message: >
|
||||
{{ [
|
||||
"Guest Mode has been enabled.",
|
||||
"I have switched to the system to guest mode.",
|
||||
"I have enabled guest mode. ",
|
||||
"Guest Mode is on."
|
||||
] | random }}
|
||||
|
||||
script:
|
||||
lockdown_issue:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: group.external_doors
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: sensor.family_status
|
||||
state: "Away"
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.lockdown_issue
|
||||
- service: script.text_notify
|
||||
data_template:
|
||||
title: "Lockdown Issue!"
|
||||
message: "Doors are open and it appears everyone has left!"
|
||||
|
||||
security_check_garage:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: cover.cargo_bay
|
||||
state: open
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.lockdown_issue
|
||||
|
||||
security_check_zones:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: group.doors
|
||||
state: 'on'
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.lockdown_issue
|
||||
|
||||
lockdown:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: group.external_doors
|
||||
state: "off"
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.sentry_mode
|
||||
|
||||
standby:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.sentry_mode
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.security_issue
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.lockdown_issue
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.security_alarm
|
||||
|
||||
visitors_here:
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
data:
|
||||
entity_id: input_boolean.guest_mode
|
||||
#- service: shell_command.haunted_guest_welcome
|
||||
|
||||
visitors_gone:
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.guest_mode
|
||||
|
||||
notification_security_alarm_audio:
|
||||
sequence:
|
||||
- service: shell_command.security_alarm
|
||||
|
||||
# notification_sentry_mode_activated_audio:
|
||||
# sequence:
|
||||
# - condition: state
|
||||
# entity_id: input_boolean.audible_notifications
|
||||
# state: 'on'
|
||||
# - condition: state
|
||||
# entity_id: media_player.theater
|
||||
# state: 'idle'
|
||||
# - service: tts.google_say
|
||||
# entity_id: media_player.theater
|
||||
# data_template:
|
||||
# message: "Sentry mode activated"
|
||||
|
||||
# notification_sentry_mode_deactivated_audio:
|
||||
# sequence:
|
||||
# - condition: state
|
||||
# entity_id: input_boolean.audible_notifications
|
||||
# state: 'on'
|
||||
# - condition: state
|
||||
# entity_id: media_player.theater
|
||||
# state: 'idle'
|
||||
# - service: tts.google_say
|
||||
# entity_id: media_player.theater
|
||||
# data_template:
|
||||
# message: "Sentry mode deactivated"
|
||||
|
||||
# notification_sentry_mode_deactiviated_text:
|
||||
# sequence:
|
||||
# - service: notify.jeff_ios
|
||||
# data:
|
||||
# message: Sentry Mode Deactivated
|
||||
|
||||
# notification_sentry_mode_activiated_text:
|
||||
# sequence:
|
||||
# - service: notify.jeff_ios
|
||||
# data:
|
||||
# message: Sentry Mode Activated
|
||||
|
||||
vacation_canceled:
|
||||
sequence:
|
||||
- data:
|
||||
entity_id: input_boolean.vacation_mode
|
||||
service: input_boolean.turn_off
|
||||
|
||||
activate_barn_door_protocol:
|
||||
sequence:
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_confirmation: 1
|
||||
- delay:
|
||||
seconds: 2
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.sentry_mode
|
||||
|
||||
deactivate_barn_door_protocol:
|
||||
sequence:
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_confirmation: 1
|
||||
- delay:
|
||||
seconds: 2
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.sentry_mode
|
||||
|
||||
activate_guest_mode:
|
||||
sequence:
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_confirmation: 1
|
||||
- delay:
|
||||
seconds: 2
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.guest_mode
|
||||
|
||||
|
106
config/packages/space.yaml
Executable file
106
config/packages/space.yaml
Executable file
@@ -0,0 +1,106 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 02/19/2019
|
||||
# @package : Space
|
||||
# @description : Tracking space. Inspiration and code taking from https://github.com/CCOSTAN/Home-AssistantConfig#logo
|
||||
# @original : https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/config/packages/space.yaml
|
||||
###############################################################################
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
binary_sensor.iss:
|
||||
icon: mdi:satellite-variant
|
||||
friendly_name: ISS Visibility
|
||||
|
||||
hidden: False
|
||||
homebridge_hidden: true
|
||||
sensor.launch_window:
|
||||
hidden: False
|
||||
icon: mdi:rocket
|
||||
friendly_name: Rocket Launch Window
|
||||
|
||||
binary_sensor:
|
||||
- platform: iss
|
||||
show_on_map: false
|
||||
|
||||
sensor:
|
||||
- platform: moon
|
||||
- platform: launch_library
|
||||
|
||||
- platform: rest
|
||||
scan_interval: 1800
|
||||
resource: https://launchlibrary.net/1.2.2/launch/next/10
|
||||
# resource: https://raw.githubusercontent.com/cribbstechnologies/ha_config/master/www/test_launch.json
|
||||
name: launch window
|
||||
# if the current timestamp is in the launch window
|
||||
# this sensor will return the UTC timestamp of the launch
|
||||
value_template: >-
|
||||
{%- for launch in value_json.launches %}
|
||||
{% if launch.location.id == 16 or launch.location.id == 17 %}
|
||||
{% if strptime(launch.isostart, '%Y%m%dT%H%M%SZ').strftime('%Y-%m-%d') == now().strftime('%Y-%m-%d') %}
|
||||
{% set utc_offset_string = now().strftime('%z') %}
|
||||
{% set utc_offset_direction = utc_offset_string[:1] %}
|
||||
{% set utc_offset_hours = now().strftime('%z')[-4:] %}
|
||||
{% set utc_offset_seconds = (utc_offset_hours| int /100) * 60 * 60 %}
|
||||
{% if utc_offset_direction == '-' %}
|
||||
{{ launch.wsstamp - utc_offset_seconds}}
|
||||
{% else %}
|
||||
{{ launch.wsstamp + utc_offset_seconds}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
automation:
|
||||
|
||||
- id: iss_tweet
|
||||
initial_state: true
|
||||
alias: 'ISS Tweet'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.iss
|
||||
to: 'on'
|
||||
from: 'off'
|
||||
action:
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: >-
|
||||
{{ [
|
||||
"The #ISS is passing over. Wave. #Space #theycanseeourhouse ",
|
||||
"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 with {{states.binary_sensor.iss.attributes.number_of_people_in_space}} people in it. #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.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
call_iss: 1
|
||||
|
||||
- id: full_moon_tweet
|
||||
initial_state: true
|
||||
alias: 'Full Moon -Tweet'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.moon
|
||||
to: 'full_moon'
|
||||
action:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: >-
|
||||
{{ [
|
||||
"There is a Full Moon out tonight, and this time it's the actual moon and not the neighbor. ",
|
||||
"Hey look kids, There's the full moon. ",
|
||||
"The moon is huge! And full. "
|
||||
] | random + "#Space #fullmoon"}}
|
79
config/packages/sysmon.yaml
Executable file
79
config/packages/sysmon.yaml
Executable file
@@ -0,0 +1,79 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 02/19/2019
|
||||
# @package : Sysmon
|
||||
# @description : A collection of Home Assistant and Pi Sensors
|
||||
###############################################################################
|
||||
|
||||
sensor:
|
||||
- platform: systemmonitor
|
||||
resources:
|
||||
- type: disk_use_percent
|
||||
arg: /
|
||||
- type: memory_use_percent
|
||||
- type: network_in
|
||||
arg: eth0
|
||||
- type: network_out
|
||||
arg: eth0
|
||||
- type: last_boot
|
||||
- type: load_15m
|
||||
- type: processor_use
|
||||
- type: last_boot
|
||||
- platform: cpuspeed
|
||||
name: CPU
|
||||
- platform: time_date
|
||||
display_options:
|
||||
- 'time'
|
||||
- 'date'
|
||||
- 'date_time'
|
||||
- 'time_date'
|
||||
- 'time_utc'
|
||||
- 'beat'
|
||||
# - platform: cert_expiry
|
||||
# host: !secret ahsl_base_url
|
||||
# name: SSL Cert Expiration
|
||||
- platform: command_line
|
||||
name: "HA Uptime"
|
||||
command: echo "$(($(date +%s) - $(date -d "$(head -n1 /home/homeassistant/.homeassistant/home-assistant.log | cut -d' ' -f-2)" +%s)))"
|
||||
scan_interval: 720
|
||||
value_template: >-
|
||||
{% set uptime = value | int %}
|
||||
{% set seconds = uptime % 60 %}
|
||||
{% set minutes = ((uptime % 3600) / 60) | int %}
|
||||
{% set hours = ((uptime % 86400) / 3600) | int %}
|
||||
{% set days = (uptime / 86400) | int %}
|
||||
{%- if days > 0 -%}
|
||||
{%- if days == 1 -%}
|
||||
1 day
|
||||
{%- else -%}
|
||||
{{ days }} days
|
||||
{%- endif -%}
|
||||
{{ ', ' }}
|
||||
{%- endif -%}
|
||||
{{ '%02d' % hours }}:{{ '%02d' % minutes }}
|
||||
- platform: template
|
||||
sensors:
|
||||
current_version_ha:
|
||||
#command: python3 -c "import requests; print(requests.get('https://pypi.python.org/pypi/homeassistant/json').json()['info']['version'])"
|
||||
friendly_name: Current HA Version
|
||||
value_template: >-
|
||||
{{ states.binary_sensor.attributes.newest_version }}
|
||||
- platform: version
|
||||
name: Installed version
|
||||
source: local
|
||||
#command: "head -5 /home/homeassistant/.homeassistant/.HA_VERSION"
|
||||
- platform: version
|
||||
name: Released Version
|
||||
source: pypi
|
||||
- platform: version
|
||||
name: Released Hassio Ver
|
||||
source: hassio
|
||||
- platform: command_line
|
||||
name: ha_v2db
|
||||
command: "ls -sh /home/homeassistant/.homeassistant/home-assistant_v2.db | cut -f1 -d ' '"
|
||||
- platform: command_line
|
||||
name: ha_log
|
||||
command: "ls -sh /home/homeassistant/.homeassistant/home-assistant.log | cut -f1 -d ' '"
|
||||
- platform: uptime
|
||||
name: Time Online
|
||||
unit_of_measurement: days
|
167
config/packages/twitter.yaml
Executable file
167
config/packages/twitter.yaml
Executable file
@@ -0,0 +1,167 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 07/15/2019
|
||||
# @package : Twitter
|
||||
# @description : Just some tweet stuff - @anchoragehouse2
|
||||
###############################################################################
|
||||
automation:
|
||||
|
||||
- id: first_day_info
|
||||
alias: First Day Info
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '00:10:00'
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{% set day=states("sensor.date").split('-')[2] | int %}
|
||||
{%- if day == 1 -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
action:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_github
|
||||
data_template:
|
||||
message: >-
|
||||
"Its a new month, so this is a good time to remind you that I am powered by @homeassistant and configured by @thejeffreystone. Find my code at https://github.com/thejeffreystone/home-assistant-configuration"
|
||||
|
||||
#- id: tweet_new_ha_version
|
||||
# alias: Tweet New HA Version
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: binary_sensor.updater
|
||||
# from: 'off'
|
||||
# to: 'on'
|
||||
# action:
|
||||
# - service: script.twitter_new_ha
|
||||
|
||||
- id: tweet_some_snark
|
||||
alias: Tweet Some Snark
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '08:00:00'
|
||||
action:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_snark
|
||||
|
||||
- id: tweet_some_stats
|
||||
alias: Tweet Some Stats
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '08:00:00'
|
||||
action:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_stats
|
||||
|
||||
- id: bot_info
|
||||
alias: Bot Info
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '10:00:00'
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{% set day=states("sensor.date").split('-')[2] | int %}
|
||||
{%- if day == 15 -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
action:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: >-
|
||||
"This is a good time to remind you that I am a bot powered by @home_assistant and configured by @thejeffreystone. Find my code at https://github.com/thejeffreystone/home-assistant-configuration"
|
||||
|
||||
- id: net_speed_report
|
||||
initial_state: true
|
||||
alias: Network Speed Report
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '11:15:00'
|
||||
action:
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: '{{ [ "According to my latest speed tests Anchorage House is getting
|
||||
{{ states.sensor.internet_test_down.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up.attributes.max_value }}
|
||||
Mbps up thanks to #ATTFiber. ", "How fast is your internet? I just checked
|
||||
am Im seeing {{ states.sensor.internet_test_down.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up.attributes.max_value }}
|
||||
Mbps up. Beat that. ", "My speed is monitored using @home_assistant and https://github.com/thejeffreystone/speedtest_to_mqtt
|
||||
and is {{ states.sensor.internet_test_down.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up.attributes.max_value }}
|
||||
Mbps up." ] | random }}'
|
||||
|
||||
- id: rex_manning_day_tweet_1
|
||||
alias: Rex Manning Day Tweet One
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '08: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:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: >-
|
||||
"Happy Rex Manning Day! https://www.youtube.com/watch?v=30fw5My1QJM #damntheman #savetheempire"
|
||||
|
||||
- id: rex_manning_day_tweet_2
|
||||
alias: Rex Manning Day Tweet Two
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '13: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:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: >-
|
||||
"We mustn't dwell. No, not today. We can't. Not on Rex Manning day! https://www.youtube.com/watch?v=szvt8iWJ0oo #damntheman #savetheempire"
|
||||
|
||||
- id: Halloween Tweet
|
||||
alias: Halloween Tweet
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '13:00:00'
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{% set month= now().month | int %}
|
||||
{%- if month == 10 -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
action:
|
||||
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: '{{ [ "There are only {{states.sensor.holiday_halloween.state}} days until Halloween.",
|
||||
"Halloween is only {{states.sensor.holiday_halloween.state}} days away. It might not be enough time. ",
|
||||
"Halloween is coming. {{states.sensor.holiday_halloween.state}} days and counting.",
|
||||
"Only {{states.sensor.holiday_halloween.state}} days until Halloween.",
|
||||
"You have {{states.sensor.holiday_halloween.state}} days until you need a costume.",
|
||||
"Only {{states.sensor.holiday_halloween.state}} days until Halloween. But who is counting. amirite?",
|
||||
"Would it be cliche if I went as a haunted house for Halloween? Asking for a another house.",
|
||||
"Just in case I wanted to be HAL 9000 for Halloween I ordered some Pod Bay Doors."
|
||||
] | random }}'
|
111
config/packages/usps.yaml
Executable file
111
config/packages/usps.yaml
Executable file
@@ -0,0 +1,111 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 02/19/2019
|
||||
# @package : USPS
|
||||
# @description : Notifies us of mails and packages.
|
||||
# Package modified from https://github.com/skalavala/smarthome/blob/master/packages/usps.yaml
|
||||
###############################################################################
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
sensor.usps_mail:
|
||||
friendly_name: USPS Mail
|
||||
icon: mdi:mailbox
|
||||
sensor.usps_packages:
|
||||
friendly_name: USPS Packages
|
||||
icon: mdi:package-variant
|
||||
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: 'USPS Mail'
|
||||
state_topic: 'house/usps/mails'
|
||||
value_template: "{{ value }}"
|
||||
|
||||
- platform: mqtt
|
||||
name: USPS Packages
|
||||
state_topic: 'house/usps/packages'
|
||||
value_template: "{{ value }}"
|
||||
|
||||
camera:
|
||||
- platform: generic
|
||||
name: USPS Mail Pictures
|
||||
still_image_url: !secret usps_camera_url
|
||||
|
||||
automation:
|
||||
- id: reset_usps
|
||||
initial_state: true
|
||||
alias: Reset USPS
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '00:00:10'
|
||||
action:
|
||||
- service: shell_command.usps
|
||||
|
||||
- id: get_usps
|
||||
initial_state: true
|
||||
alias: Get USPS
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '10:00:00'
|
||||
action:
|
||||
- service: shell_command.usps
|
||||
|
||||
# Notify USPS mails via TTS, and iOS notification with attachment
|
||||
###############################################################################
|
||||
- id: notify_usps_mail
|
||||
alias: Notify USPS Mail
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.usps_mail
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{ states.sensor.usps_mail.state | int > 0 }}'
|
||||
- condition: template
|
||||
value_template: '{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
usps: >-
|
||||
{%- if states.sensor.usps_mail.state | int == 1 -%}
|
||||
USPS is delivering {{ states.sensor.usps_mail.state }} piece of mail today.
|
||||
{%- else -%}
|
||||
USPS is delivering {{ states.sensor.usps_mail.state }} pieces of mail today.
|
||||
{%- endif -%}
|
||||
call_interuption: 1
|
||||
- service: script.text_notify
|
||||
data_template:
|
||||
who: "jeff"
|
||||
title: "USPS Delivering Today"
|
||||
message: "USPS will be delivering {{ states.sensor.usps_mail.state }} piece(s) of mail today."
|
||||
# data:
|
||||
# push:
|
||||
# category: camera
|
||||
# entity_id: "camera.usps_mail_pictures"
|
||||
# attachment:
|
||||
# url: "{{ states.camera.usps_mail_pictures.attributes.entity_picture }}"
|
||||
# content-type: jpg
|
||||
|
||||
# Notify USPS packages via TTS. Usually there are no pictures for packages
|
||||
###############################################################################
|
||||
- id: notify_usps_packages
|
||||
alias: Notify USPS Packages
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.usps_packages
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{ states.sensor.usps_packages.state | int > 0 }}'
|
||||
- condition: template
|
||||
value_template: '{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}'
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
usps: >
|
||||
{%- if states.sensor.usps_packages.state | int == 1 -%}
|
||||
USPS is delivering {{ states.sensor.usps_packages.state }} package today.
|
||||
{%- else -%}
|
||||
USPS is delivering {{ states.sensor.usps_packages.state }} packages today.
|
||||
{%- endif -%}
|
||||
call_interuption: 1
|
243
config/packages/weather_alerts_nws.yaml
Executable file
243
config/packages/weather_alerts_nws.yaml
Executable file
@@ -0,0 +1,243 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 02/19/2019
|
||||
# @package : NWS Alerts
|
||||
# @description : NWS Alerts
|
||||
# @original : https://github.com/Vasiley/Home-Assistant-Main/blob/master/packages/weather_alerts_nws.yaml
|
||||
###############################################################################
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
package.node_anchors:
|
||||
customize: &customize
|
||||
package: 'weather_alerts'
|
||||
sensor.nws_alert_count:
|
||||
friendly_name: Alerts
|
||||
icon: mdi:alert-outline
|
||||
|
||||
group:
|
||||
alerts_card:
|
||||
name: Alerts
|
||||
entities:
|
||||
- sensor.nws_alerts
|
||||
|
||||
### You first need to find either your NWS Zone ID or County ID. I’m not sure which is better but I used my Zone ID here.
|
||||
### You can find your Zone ID by going to https://alerts.weather.gov/ 7, scroll down to your state and click on the “zone list” then look for the entry for your county.
|
||||
### I recommond useing both
|
||||
|
||||
#I’ve taken much of the underlying work here and created a custom component for nws alerts sensor.
|
||||
#The sensor can be created by adding the nws_alerts.py file to <config_directory>/custom_components/sensor/ and adding the following to your sensor definitions:
|
||||
|
||||
sensor:
|
||||
- platform: nws_alerts
|
||||
zone_id: 'GAZ034,GAC135'
|
||||
|
||||
automation:
|
||||
- alias: 'NWS Weather Alert Pop Up Control'
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.nws_alerts
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{states.sensor.nws_alerts.state | int > 0}}'
|
||||
- condition: template
|
||||
value_template: '{{ trigger.to_state.state|float > trigger.from_state.state|float }}'
|
||||
action:
|
||||
service: script.nws_popup_on_wx_alert
|
||||
data_template:
|
||||
title: >
|
||||
{% if states.sensor.nws_alerts.attributes.title.split(' - ')[5] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.title.split(' - ')[5] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[4] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.title.split(' - ')[4] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[3] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.title.split(' - ')[3] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[2] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.title.split(' - ')[2] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[1] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.title.split(' - ')[1] }}"
|
||||
{% else %}
|
||||
"{{ states.sensor.nws_alerts.attributes.title.split(' - ')[0] }}"
|
||||
{% endif %}
|
||||
message: >
|
||||
{% if states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[5] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[5] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[4] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[4] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[3] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[3] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[2] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[2] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[1] is defined %}
|
||||
"{{ states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[1] }}"
|
||||
{% else %}
|
||||
"{{ states.sensor.nws_alerts.attributes.display_desc.split('\n\n-\n\n')[0] }}"
|
||||
{% endif %}
|
||||
|
||||
- alias: NWS Notification Weather Alert
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.nws_alerts
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{states.sensor.nws_alerts.state | int > 0}}'
|
||||
- condition: template
|
||||
value_template: '{{ trigger.to_state.state|float > trigger.from_state.state|float }}'
|
||||
action:
|
||||
- service: script.text_notify
|
||||
data_template:
|
||||
title: "Weather Alert for Anchorage House"
|
||||
message: >
|
||||
{% if states.sensor.nws_alerts.attributes.title.split(' - ')[5] is defined %}
|
||||
"NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[5] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[4] is defined %}
|
||||
"NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[4] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[3] is defined %}
|
||||
"NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[3] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[2] is defined %}
|
||||
"NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[2] }}"
|
||||
{% elif states.sensor.nws_alerts.attributes.title.split(' - ')[1] is defined %}
|
||||
"NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[1] }}"
|
||||
{% else %}
|
||||
"NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[0] }}"
|
||||
{% endif %}
|
||||
|
||||
- alias: NWS Announce Weather Alert
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.nws_alerts
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{states.sensor.nws_alerts.state | int > 0}}"
|
||||
- condition: template
|
||||
value_template: '{{ trigger.to_state.state|float > trigger.from_state.state|float }}'
|
||||
- condition: template
|
||||
value_template: "{{ (('Severe' in states.sensor.nws_alerts.attributes.title) or ('Thunderstorm' in states.sensor.nws_alerts.attributes.title)) and 'Warning' in states.sensor.nws_alerts.attributes.title }}"
|
||||
action:
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
speech_message: >
|
||||
{% if states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] }}
|
||||
{% else %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[0] }}
|
||||
{% endif %}
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: '{{ [ "Anchorage House is battening down the hatches. Servere Weather is imminent. ",
|
||||
"The weather outside is getting intense, so I just made a weather announcement.",
|
||||
"Anchorage House monitors the NWS using #HomeAssistant just for these occasions. Thanks for the heads up @NWSAtlanta " ] | random }}'
|
||||
- delay: '00:00:15'
|
||||
- service: script.ah_report
|
||||
data_template:
|
||||
speech_message: >
|
||||
{% if states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] }}
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] is defined %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] }}
|
||||
{% else %}
|
||||
The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[0] }}
|
||||
{% endif %}
|
||||
|
||||
- alias: NWS Announce Weather Alert for Tornado
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.nws_alerts
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{states.sensor.nws_alerts.state | int > 0}}"
|
||||
- condition: template
|
||||
value_template: "{{ 'Tornado Warning' in states.sensor.nws_alerts.attributes.title}}"
|
||||
action:
|
||||
- service: script.jarvis_alert
|
||||
data_template:
|
||||
message: "Attention!,,,Attention!,,,The National Weather Service Has issued a Tornado Warning for our area."
|
||||
- service: script.twitter_notify
|
||||
data_template:
|
||||
message: '{{ [ "NWS is sounding the Tornado alarm, so I am too. Anchorage House is taking cover. ",
|
||||
"Anchorage House is heading to the closet because the NWS just issued a tornado warning for our area.",
|
||||
"I just activated the internal Tornado Alarm at the request of the NWS. Thanks for the heads up @NWSAtlanta " ] | random }}'
|
||||
- delay: '00:00:15'
|
||||
- service: script.jarvis_alert
|
||||
data_template:
|
||||
message: "Attention!,,,Attention!,,,The National Weather Service Has issued a Tornado Warning for our area."
|
||||
- delay: '00:00:15'
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.tornado_alarm
|
||||
- service: script.text_alert
|
||||
data_template:
|
||||
title: "Tornado Warning!"
|
||||
message: "The National Weather Service Has issued a Tornado Warning for our area."
|
||||
|
||||
- alias: Activate Tornado alarm
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.tornado_alarm
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: media_player.play_media
|
||||
entity_id: media_player.theater
|
||||
data:
|
||||
media_content_id: /media/audio/Tornado_Siren.mp3
|
||||
media_content_type: "music"
|
||||
|
||||
- alias: Deactivate Tornado alarm
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.tornado_alarm
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
|
||||
action:
|
||||
- service: media_player.media_stop
|
||||
entity_id: media_player.theater
|
||||
|
||||
|
||||
script:
|
||||
nws_popup_on_wx_alert:
|
||||
alias: NWS Weather Alert Pop Up
|
||||
sequence:
|
||||
## Dismiss any current alert so the UI isn't filled
|
||||
## up with these if there are more then one.
|
||||
## Only show the latest alert
|
||||
- service: persistent_notification.dismiss
|
||||
data:
|
||||
notification_id: "nwswxalert"
|
||||
## Create a new persistant notification in the UI for a new alert
|
||||
- service_template: >
|
||||
{% if states.sensor.nws_alerts.state != '0' %}
|
||||
persistent_notification.create
|
||||
{% endif %}
|
||||
data_template:
|
||||
notification_id: "nwswxalert"
|
||||
message: "{{ message }}"
|
||||
title: '{{ title }}'
|
||||
|
||||
tornado_alarm:
|
||||
sequence:
|
||||
- service: shell_command.tornado_alarm
|
162
config/packages/weekday.yaml
Executable file
162
config/packages/weekday.yaml
Executable file
@@ -0,0 +1,162 @@
|
||||
###############################################################################
|
||||
# @author : Jeffrey Stone
|
||||
# @date : 02/19/2019
|
||||
# @package : Weekday
|
||||
# @description : Weekday Sensor for use as a condition in automations and scripts
|
||||
###############################################################################
|
||||
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: weekday
|
||||
state_topic: "house/week/day"
|
||||
|
||||
script:
|
||||
monday:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/week/day
|
||||
payload: mon
|
||||
retain: true
|
||||
tuesday:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/week/day
|
||||
payload: tue
|
||||
retain: true
|
||||
wednesday:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/week/day
|
||||
payload: wed
|
||||
retain: true
|
||||
thursday:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/week/day
|
||||
payload: thu
|
||||
retain: true
|
||||
friday:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/week/day
|
||||
payload: fri
|
||||
retain: true
|
||||
saturday:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/week/day
|
||||
payload: sat
|
||||
retain: true
|
||||
sunday:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/week/day
|
||||
payload: sun
|
||||
retain: true
|
||||
|
||||
automation:
|
||||
- alias: set weekday mon
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: 00:00:01
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: time
|
||||
weekday:
|
||||
- mon
|
||||
action:
|
||||
- service: script.monday
|
||||
id: set_weekday_mon
|
||||
- alias: set weekday tue
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: 00:00:01
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: time
|
||||
weekday:
|
||||
- tue
|
||||
action:
|
||||
- service: script.tuesday
|
||||
id: set_weekday_tue
|
||||
- alias: set weekday wed
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: 00:00:01
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: time
|
||||
weekday:
|
||||
- wed
|
||||
action:
|
||||
- service: script.wednesday
|
||||
id: set_weekday_wed
|
||||
- alias: set weekday thu
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '00:00:01'
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: time
|
||||
weekday:
|
||||
- thu
|
||||
action:
|
||||
- service: script.thursday
|
||||
id: set_weekday_thu
|
||||
- alias: set weekday fri
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '00:00:01'
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: time
|
||||
weekday:
|
||||
- fri
|
||||
action:
|
||||
- service: script.friday
|
||||
id: set_weekday_fri
|
||||
- alias: set weekday sat
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '00:00:01'
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: time
|
||||
weekday:
|
||||
- sat
|
||||
action:
|
||||
- service: script.saturday
|
||||
id: set_weekday_sat
|
||||
- alias: set weekday sun
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '00:00:01'
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: time
|
||||
weekday:
|
||||
- sun
|
||||
action:
|
||||
- service: script.sunday
|
||||
id: set_weekday_sun
|
65
config/packages/zigbee2mqtt.yaml
Executable file
65
config/packages/zigbee2mqtt.yaml
Executable file
@@ -0,0 +1,65 @@
|
||||
|
||||
input_boolean:
|
||||
zigbee_permit_join:
|
||||
name: Allow devices to join
|
||||
initial: off
|
||||
icon: mdi:cellphone-wireless
|
||||
|
||||
timer:
|
||||
zigbee_permit_join:
|
||||
name: Time remaining
|
||||
duration: 600 # Updated this to the number of seconds you wish
|
||||
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: Bridge state
|
||||
state_topic: "homeassistant/bridge/state"
|
||||
icon: mdi:router-wireless
|
||||
|
||||
automation:
|
||||
- id: enable_zigbee_join
|
||||
alias: Enable Zigbee joining
|
||||
hide_entity: true
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: input_boolean.zigbee_permit_join
|
||||
to: 'on'
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: homeassistant/bridge/config/permit_join
|
||||
payload: 'true'
|
||||
- service: timer.start
|
||||
data:
|
||||
entity_id: timer.zigbee_permit_join
|
||||
- id: disable_zigbee_join
|
||||
alias: Disable Zigbee joining
|
||||
trigger:
|
||||
- entity_id: input_boolean.zigbee_permit_join
|
||||
platform: state
|
||||
to: 'off'
|
||||
action:
|
||||
- data:
|
||||
payload: 'false'
|
||||
topic: homeassistant/bridge/config/permit_join
|
||||
service: mqtt.publish
|
||||
- data:
|
||||
entity_id: timer.zigbee_permit_join
|
||||
service: timer.cancel
|
||||
hide_entity: true
|
||||
- id: disable_zigbee_join_timer
|
||||
alias: Disable Zigbee joining by timer
|
||||
hide_entity: true
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: timer.finished
|
||||
event_data:
|
||||
entity_id: timer.zigbee_permit_join
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: homeassistant/bridge/config/permit_join
|
||||
payload: 'false'
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.zigbee_permit_join
|
66
config/python_scripts/light_transistion.py
Executable file
66
config/python_scripts/light_transistion.py
Executable file
@@ -0,0 +1,66 @@
|
||||
#
|
||||
# Script to fade lights in slowly
|
||||
# Takes the following inputs
|
||||
# entity_id = The light you want to fade in
|
||||
# transition: = # Seconds to go from current to end brightness
|
||||
# brightness: = # Brightness to end at
|
||||
# brightness_pct: = # Brightness to end at as a percentage
|
||||
#
|
||||
entity_id = data.get('entity_id')
|
||||
brightness = data.get('brightness', None)
|
||||
brightness_pct = data.get('brightness_pct', None)
|
||||
|
||||
if entity_id is not None and (brightness is not None or brightness_pct is not None):
|
||||
light = hass.states.get(entity_id)
|
||||
|
||||
start_level = light.attributes.get('brightness', 0)
|
||||
transition = int(data.get('transition', 0))
|
||||
|
||||
""" Use brightness or convert brightness_pct """
|
||||
end_level = int(brightness) if brightness is not None else math.ceil(
|
||||
float(brightness_pct) * 2.55)
|
||||
|
||||
""" Calculate number of steps """
|
||||
steps = int(math.fabs((start_level - end_level)))
|
||||
fadeout = True if start_level > end_level else False
|
||||
|
||||
""" Calculate the delay time """
|
||||
delay = round(transition / steps, 3)
|
||||
|
||||
""" Disable delay and increase stepping if delay < 3/4 second """
|
||||
if (delay < .750):
|
||||
delay = 0
|
||||
steps = int(steps / 5)
|
||||
step_by = 5
|
||||
else:
|
||||
step_by = 1
|
||||
|
||||
logger.info('Setting brightness of ' + str(entity_id) +
|
||||
' from ' + str(start_level) + ' to ' + str(end_level) +
|
||||
' steps ' + str(steps) + ' delay ' + str(delay))
|
||||
|
||||
new_level = start_level
|
||||
for x in range(steps):
|
||||
current_level = light.attributes.get('brightness', 0)
|
||||
if (fadeout and current_level < new_level):
|
||||
break
|
||||
elif (not fadeout and current_level > new_level):
|
||||
break
|
||||
else:
|
||||
data = {"entity_id": entity_id, "brightness": new_level}
|
||||
hass.services.call('light', 'turn_on', data)
|
||||
if (fadeout):
|
||||
new_level = new_level - step_by
|
||||
else:
|
||||
new_level = new_level + step_by
|
||||
""" Do not sleep for 0 delay """
|
||||
if (delay > 0):
|
||||
time.sleep(delay)
|
||||
|
||||
""" Ensure light ends at the final state """
|
||||
if (end_level > 0):
|
||||
data = {"entity_id": entity_id, "brightness": end_level}
|
||||
hass.services.call('light', 'turn_on', data)
|
||||
else:
|
||||
data = {"entity_id": entity_id}
|
||||
hass.services.call('light', 'turn_off', data)
|
39
config/python_scripts/special_events.py
Executable file
39
config/python_scripts/special_events.py
Executable file
@@ -0,0 +1,39 @@
|
||||
today = datetime.datetime.now().date()
|
||||
|
||||
name = data.get('name')
|
||||
type = data.get('type')
|
||||
sensorName = "sensor.{}_{}".format(type , name.replace(" " , "_"))
|
||||
|
||||
dateStr = data.get('date')
|
||||
dateSplit = dateStr.split("/")
|
||||
|
||||
dateDay = int(dateSplit[0])
|
||||
dateMonth = int(dateSplit[1])
|
||||
dateYear = int(dateSplit[2])
|
||||
date = datetime.date(dateYear,dateMonth,dateDay)
|
||||
|
||||
thisYear = today.year
|
||||
nextOccur = datetime.date(thisYear , dateMonth , dateDay)
|
||||
|
||||
numberOfDays = 0
|
||||
years = int(thisYear) - dateYear
|
||||
|
||||
|
||||
if today < nextOccur:
|
||||
numberOfDays = (nextOccur - today).days
|
||||
|
||||
elif today > nextOccur:
|
||||
nextOccur = datetime.date(thisYear+1 , dateMonth , dateDay)
|
||||
numberOfDays = int((nextOccur - today).days)
|
||||
years = years+1
|
||||
|
||||
|
||||
hass.states.set(sensorName , numberOfDays ,
|
||||
{
|
||||
"icon" : "mdi:calendar-star" ,
|
||||
"unit_of_measurement" : "days" ,
|
||||
"friendly_name" : "{}'s {}".format(name, type) ,
|
||||
"years" : years
|
||||
}
|
||||
)
|
||||
|
268
config/scenes.yaml
Executable file
268
config/scenes.yaml
Executable file
@@ -0,0 +1,268 @@
|
||||
- name: test_dim_75
|
||||
entities:
|
||||
group.rgb_lr:
|
||||
state: on
|
||||
brightness_pct: 75
|
||||
color_temp: 369
|
||||
|
||||
- name: test_dim_50
|
||||
entities:
|
||||
group.rgb_lr:
|
||||
state: on
|
||||
brightness_pct: 50
|
||||
color_temp: 369
|
||||
|
||||
- name: test_dim_25
|
||||
entities:
|
||||
group.rgb_lr:
|
||||
state: on
|
||||
brightness_pct: 25
|
||||
color_temp: 369
|
||||
|
||||
- name : test
|
||||
entities:
|
||||
group.rgb_lr:
|
||||
state: on
|
||||
brightness: 250
|
||||
color_name: "blue"
|
||||
|
||||
- name : test2
|
||||
entities:
|
||||
group.rgb_lr:
|
||||
state: off
|
||||
color_temp: 369
|
||||
|
||||
- name : test3
|
||||
entities:
|
||||
group.rgb_lr:
|
||||
state: on
|
||||
brightness: 250
|
||||
color_temp: 369
|
||||
#rgb_color: [255,255,255]
|
||||
|
||||
- name: normal livingroom lighting
|
||||
entities:
|
||||
group.rgb_lr:
|
||||
state: on
|
||||
brightness: 250
|
||||
color_temp: 369
|
||||
# light.front_door_lamp:
|
||||
# state: on
|
||||
# brightness: 250
|
||||
# light.living_room_lamp:
|
||||
# state: on
|
||||
# brightness: 250
|
||||
|
||||
- name: dimished livingroom lighting
|
||||
entities:
|
||||
light.0xb0ce18140003608a_light_2:
|
||||
state: on
|
||||
brightness: 40
|
||||
color_temp: 369
|
||||
light.0xb0ce181400051072_light_2:
|
||||
state: off
|
||||
light.0xb0ce181400051b4c_light_2:
|
||||
state: off
|
||||
switch.fireplace_lights:
|
||||
state: off
|
||||
|
||||
- name: illuminations livingroom lighting two
|
||||
entities:
|
||||
light.tower_lamp_2:
|
||||
state: on
|
||||
brightness: 40
|
||||
color_temp: 369
|
||||
light.front_door_lamp:
|
||||
state: on
|
||||
brightness: 40
|
||||
color_temp: 369
|
||||
light.living_room_lamp:
|
||||
state: off
|
||||
switch.fireplace_lights:
|
||||
state: off
|
||||
|
||||
- name: illuminations livingroom lighting three
|
||||
entities:
|
||||
light.tower_lamp_2:
|
||||
state: on
|
||||
brightness: 40
|
||||
color_temp: 369
|
||||
light.front_door_lamp:
|
||||
state: on
|
||||
brightness: 40
|
||||
light.living_room_lamp:
|
||||
state: on
|
||||
brightness: 40
|
||||
color_temp: 369
|
||||
switch.fireplace_lights:
|
||||
state: off
|
||||
|
||||
# light.0xb0ce18140003608a_light_2 = Tower Lamp
|
||||
# light.0xb0ce181400051072_light_2 = Front Door Lamp
|
||||
# light0xb0ce181400051b4c_light_2 = Table Lampo
|
||||
|
||||
- name: night time livingroom lighting
|
||||
entities:
|
||||
light.0xb0ce18140003608a_light_2:
|
||||
state: on
|
||||
brightness: 10
|
||||
color_temp: 369
|
||||
light.0xb0ce181400051072_light_2:
|
||||
state: off
|
||||
light.0xb0ce181400051b4c_light_2:
|
||||
state: off
|
||||
switch.fireplace_lights:
|
||||
state: off
|
||||
|
||||
- name: diminished kitchen lighting
|
||||
entities:
|
||||
light.kitchen_cabinets:
|
||||
state: on
|
||||
brightness: 10
|
||||
light.kitchen_cabinet_lights:
|
||||
state: off
|
||||
|
||||
- name: normal kitchen lighting
|
||||
entities:
|
||||
light.kitchen_cabinets:
|
||||
state: on
|
||||
brightness: 250
|
||||
light.kitchen_cabinet_lights:
|
||||
state: on
|
||||
|
||||
- name: haunted preshow
|
||||
entities:
|
||||
light.kitchen_cabinets:
|
||||
state: off
|
||||
light.kitchen_cabinet_lights:
|
||||
state: off
|
||||
switch.ge_14291_in_wall_smart_switch_switch_2:
|
||||
state: off
|
||||
group.rgb_lr:
|
||||
state: on
|
||||
brightness_pct: 100
|
||||
# light.front_door_lamp:
|
||||
# state: on
|
||||
# brightness: 40
|
||||
# light.living_room_lamp:
|
||||
# state: on
|
||||
# brightness: 40
|
||||
switch.fireplace_lights:
|
||||
state: off
|
||||
|
||||
- name: haunted lights out
|
||||
entities:
|
||||
light.kitchen_cabinets:
|
||||
state: off
|
||||
light.kitchen_cabinet_lights:
|
||||
state: off
|
||||
switch.ge_14291_in_wall_smart_switch_switch_2:
|
||||
state: off
|
||||
group.rgb_lr:
|
||||
state: off
|
||||
# light.front_door_lamp:
|
||||
# state: off
|
||||
# light.living_room_lamp:
|
||||
# state: off
|
||||
switch.fireplace_lights:
|
||||
state: off
|
||||
|
||||
- name: jeff light on
|
||||
entities:
|
||||
light.0xe20db9fffe004207_light:
|
||||
state: on
|
||||
brightness: 100
|
||||
|
||||
- name: jeff light off
|
||||
entities:
|
||||
light.0xe20db9fffe004207_light:
|
||||
state: off
|
||||
|
||||
|
||||
- name: jeff wake up
|
||||
entities:
|
||||
light.0xe20db9fffe004207_light:
|
||||
state: on
|
||||
brightness: 20
|
||||
|
||||
- name: jeff bedtime
|
||||
entities:
|
||||
light.0xe20db9fffe004207_light:
|
||||
state: on
|
||||
brightness: 40
|
||||
|
||||
- name: jeff night light
|
||||
entities:
|
||||
light.0xe20db9fffe004207_light:
|
||||
state: on
|
||||
brightness: 10
|
||||
|
||||
- name: house party protocol
|
||||
entities:
|
||||
switch.incense_3:
|
||||
state: on
|
||||
switch.artemis_2:
|
||||
state: on
|
||||
|
||||
- name: skylar lamp on
|
||||
entities:
|
||||
light.table_lamp_2:
|
||||
state: on
|
||||
brightness: 100
|
||||
|
||||
- name: skylar lamp 75
|
||||
entities:
|
||||
light.table_lamp_2:
|
||||
state: on
|
||||
brightness: 75
|
||||
|
||||
- name: skylar lamp 50
|
||||
entities:
|
||||
light.table_lamp_2:
|
||||
state: on
|
||||
brightness: 50
|
||||
|
||||
- name: skylar lamp 25
|
||||
entities:
|
||||
light.table_lamp_2:
|
||||
state: on
|
||||
brightness: 25
|
||||
|
||||
- name: skylar lamp off
|
||||
entities:
|
||||
light.table_lamp_2:
|
||||
state: off
|
||||
|
||||
# - name: santa protocol
|
||||
# entities:
|
||||
# switch.christmas_tree:
|
||||
# state: on
|
||||
# switch.upstairs_christmas_tree:
|
||||
# state: on
|
||||
# light.tower_lamp:
|
||||
# state: on
|
||||
# brightness: 10
|
||||
# light.front_lamp:
|
||||
# state: on
|
||||
# brightness: 10
|
||||
|
||||
|
||||
#########################################
|
||||
# Haunted Manshion show scenes
|
||||
#
|
||||
# These scenes are used in the Haunted Mansion show that
|
||||
# takes place when requested
|
||||
|
||||
- name : lr_cool_white
|
||||
entities:
|
||||
group.rgb_lr:
|
||||
state: on
|
||||
brightness_pct: 100
|
||||
rgb_color: [255,255,255]
|
||||
|
||||
- name : lr_blue
|
||||
entities:
|
||||
group.rgb_lr:
|
||||
state: on
|
||||
brightness_pct: 100
|
||||
color_name: "blue"
|
0
config/scripts.yaml
Normal file
0
config/scripts.yaml
Normal file
43
config/scripts/appliances.yaml
Executable file
43
config/scripts/appliances.yaml
Executable file
@@ -0,0 +1,43 @@
|
||||
washer_finished_notification_audible:
|
||||
sequence:
|
||||
- delay:
|
||||
minutes: 15
|
||||
- condition: state
|
||||
entity_id: sensor.family_status
|
||||
state: Home
|
||||
- condition: state
|
||||
entity_id: sensor.washer_status
|
||||
state: complete
|
||||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
call_washer_needs_emptying: 1
|
||||
|
||||
washer_idle:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/washer/status
|
||||
payload: idle
|
||||
retain: true
|
||||
washer_running:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/washer/status
|
||||
payload: running
|
||||
retain: true
|
||||
washer_complete:
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/washer/status
|
||||
payload: complete
|
||||
retain: true
|
||||
|
||||
reset_ha_speaker:
|
||||
sequence:
|
||||
- delay:
|
||||
seconds: 30
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.ha_speaker
|
153
config/scripts/general.yaml
Executable file
153
config/scripts/general.yaml
Executable file
@@ -0,0 +1,153 @@
|
||||
|
||||
|
||||
close_garage:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: cover.cargo_bay
|
||||
state: open
|
||||
- service: cover.close_cover
|
||||
entity_id: cover.cargo_bay
|
||||
open_garage:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: cover.cargo_bay
|
||||
state: closed
|
||||
- service: cover.open_cover
|
||||
entity_id: cover.cargo_bay
|
||||
|
||||
|
||||
|
||||
sunset_garage_open:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.ecolink_garage_door_tilt_sensor_sensor
|
||||
state: 'on'
|
||||
- service: script.driveway_all_on
|
||||
|
||||
inside_all_on:
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
data:
|
||||
entity_id: light.tower_lamp_4
|
||||
- service: light.turn_on
|
||||
data:
|
||||
entity_id: light.front_door_lamp
|
||||
- service: switch.turn_on
|
||||
data:
|
||||
entity_id: switch.fireplace_lights
|
||||
- service: light.turn_on
|
||||
data:
|
||||
entity_id: light.living_room_lamp
|
||||
- service: light.turn_on
|
||||
data:
|
||||
entity_id: light.kitchen_light_strip
|
||||
- service: light.turn_on
|
||||
data:
|
||||
entity_id: light.kitchen_cabinets
|
||||
- service: scene.turn_on
|
||||
data:
|
||||
entity_id: scene.livingroom_normal
|
||||
inside_all_off:
|
||||
sequence:
|
||||
- data:
|
||||
entity_id: light.tower_lamp_4
|
||||
service: light.turn_off
|
||||
- data:
|
||||
entity_id: light.living_room_lamp
|
||||
service: light.turn_off
|
||||
- data:
|
||||
entity_id: light.front_door_lamp
|
||||
service: light.turn_off
|
||||
- data:
|
||||
entity_id: light.kitchen_cabinets
|
||||
service: light.turn_off
|
||||
- data:
|
||||
entity_id: light.kitchen_cabinet_lights
|
||||
service: light.turn_off
|
||||
- entity_id: switch.fireplace_lights
|
||||
service: switch.turn_off
|
||||
- entity_id: switch.upstairs
|
||||
service: switch.turn_off
|
||||
- entity_id: light.jeff_lamp
|
||||
service: light.turn_off
|
||||
all_fans_off:
|
||||
sequence:
|
||||
- data:
|
||||
entity_id: switch.upstairs_fan
|
||||
service: switch.turn_off
|
||||
- data:
|
||||
entity_id: switch.living_room_fan
|
||||
service: switch.turn_off
|
||||
family_is_home:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: sensor.family_status
|
||||
state: Away
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/family/status
|
||||
payload_template: Home
|
||||
retain: true
|
||||
family_is_away:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: sensor.family_status
|
||||
state: Home
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: house/family/status
|
||||
payload_template: Away
|
||||
retain: true
|
||||
driveway_on:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: below_horizon
|
||||
- data:
|
||||
entity_id: switch.driveway_light
|
||||
service: switch.turn_on
|
||||
- data:
|
||||
entity_id: light.side_door_light
|
||||
service: light.turn_on
|
||||
driveway_off:
|
||||
sequence:
|
||||
- delay:
|
||||
seconds: 120
|
||||
- condition: state
|
||||
entity_id: binary_sensor.side_door
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garage_door
|
||||
state: 'off'
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.driveway_light
|
||||
- service: light.turn_off
|
||||
entity_id: light.side_door_light
|
||||
chromecast_media_stop:
|
||||
sequence:
|
||||
- service: media_player.media_stop
|
||||
data:
|
||||
entity_id: media_player.theater
|
||||
appliances_on:
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
data:
|
||||
entity_id: switch.box_fans
|
||||
appliances_off:
|
||||
sequence:
|
||||
- data:
|
||||
entity_id: switch.box_fans
|
||||
service: switch.turn_off
|
||||
- data:
|
||||
entity_id: switch.incense_3
|
||||
service: switch.turn_off
|
||||
- data:
|
||||
entity_id: switch.artemis_2
|
||||
service: switch.turn_off
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
30
config/scripts/lights.yaml
Executable file
30
config/scripts/lights.yaml
Executable file
@@ -0,0 +1,30 @@
|
||||
#########################################
|
||||
#
|
||||
# Light Based Scripts
|
||||
#
|
||||
#########################################
|
||||
|
||||
|
||||
##########################
|
||||
# Dim Living Room lights slowly - Sengled Bulbs - No Built in Transistion.
|
||||
# Script can take a delay, if no delay is passed delay is set to 5
|
||||
# delay should be in seconds
|
||||
# Script takes the following
|
||||
# entity_id = The light you want to fade in
|
||||
# transition: = # Seconds to go from current to end brightness
|
||||
# brightness_pct: = # Brightness to end at as a percentage
|
||||
lr_sengled_transistion_on:
|
||||
sequence:
|
||||
- service: python_script.light_transistion
|
||||
data:
|
||||
entity_id: light.tower_lamp_2
|
||||
brightness_pct: 100
|
||||
transition: 60
|
||||
|
||||
lr_sengled_transistion_off:
|
||||
sequence:
|
||||
- service: python_script.light_transistion
|
||||
data:
|
||||
entity_id: light.tower_lamp_2
|
||||
brightness_pct: 0
|
||||
transition: 60
|
52
config/scripts/spotify.yaml
Executable file
52
config/scripts/spotify.yaml
Executable file
@@ -0,0 +1,52 @@
|
||||
# play_skylars_christmas_playlist:
|
||||
# sequence:
|
||||
# - service: media_player.volume_set
|
||||
# data:
|
||||
# entity_id: media_player.spotify
|
||||
# volume_level: '0.40'
|
||||
# - service: media_player.select_source
|
||||
# data_template:
|
||||
# entity_id: media_player.spotify
|
||||
# source: '{% if is_state("input_select.spotify_source", "Everywhere") %} Everywhere
|
||||
# {% elif is_state("input_select.spotify_source", "Living Room") %} Living Room
|
||||
# {% elif is_state("input_select.spotify_source", "Kitchen") %} Kitchen {% elif
|
||||
# is_state("input_select.spotify_source", "Master Bedroom") %} Master Bedroom
|
||||
# {% endif %}
|
||||
|
||||
# '
|
||||
# - service: media_player.play_media
|
||||
# data_template:
|
||||
# entity_id: media_player.spotify
|
||||
# media_content_type: playlist
|
||||
# media_content_id: spotify:user:spotify:playlist:2lmfykOn8EK0Ow8iH9XHLa
|
||||
# - service: media_player.shuffle_set
|
||||
# data:
|
||||
# entity_id: media_player.spotify
|
||||
# shuffle: '{% if is_state("input_boolean.shuffle_spotify", "On") %} True {% elif
|
||||
# is_state("input_select.shuffle_spotify", "Off") %} False {% endif %}
|
||||
|
||||
# '
|
||||
# play_skylars_playlist:
|
||||
# sequence:
|
||||
# - service: media_player.volume_set
|
||||
# data:
|
||||
# entity_id: media_player.spotify
|
||||
# volume_level: '0.40'
|
||||
# - service: media_player.select_source
|
||||
# data_template:
|
||||
# entity_id: media_player.spotify
|
||||
# source: '{% if is_state("input_select.spotify_source", "Everywhere") %} Everywhere
|
||||
# {% elif is_state("input_select.spotify_source", "Living Room") %} Living Room
|
||||
# {% elif is_state("input_select.spotify_source", "Kitchen") %} Kitchen {% elif
|
||||
# is_state("input_select.spotify_source", "Master Bedroom") %} Master Bedroom
|
||||
# {% endif %}'
|
||||
# - service: media_player.play_media
|
||||
# data_template:
|
||||
# entity_id: media_player.spotify
|
||||
# media_content_type: playlist
|
||||
# media_content_id: spotify:user:spotify:playlist:0hYKkmUpFFG37TtFX23cMM
|
||||
# - service: media_player.shuffle_set
|
||||
# data:
|
||||
# entity_id: media_player.spotify
|
||||
# shuffle: '{% if is_state("input_boolean.shuffle_spotify", "On") %} True {% elif
|
||||
# is_state("input_select.shuffle_spotify", "Off") %} False {% endif %}'
|
50
config/sensors/batteries.yaml
Executable file
50
config/sensors/batteries.yaml
Executable file
@@ -0,0 +1,50 @@
|
||||
- platform: template
|
||||
sensors:
|
||||
jeff_iphone_batt:
|
||||
unit_of_measurement: '%'
|
||||
value_template: >-
|
||||
{%- if states.device_tracker.jeffreystonesiphone.attributes.battery %}
|
||||
{{ states.device_tracker.jeffreystonesiphone.attributes.battery | round(1) }}
|
||||
{% else %}
|
||||
{{ states.sensor.jeff_iphone_batt.state }}
|
||||
{%- endif %}
|
||||
icon_template: '{%- if is_state("sensor.jeff_iphone_batt", "unknown") %}mdi:battery-unknown{%- elif is_state_attr("device_tracker.jeffreystonesiphone", "battery_status", "Charging") %}mdi:battery-charging{%- elif states.device_tracker.jeffreystonesiphone.attributes.battery <= 5 %}mdi:battery-outline{%- elif states.device_tracker.jeffreystonesiphone.attributes.battery >= 95 %}mdi:battery{% else %}mdi:battery-{{(states.device_tracker.jeffreystonesiphone.attributes.battery|float / 10)|round*10}}{%- endif %}'
|
||||
kat_iphone_batt:
|
||||
unit_of_measurement: '%'
|
||||
value_template: >-
|
||||
{%- if states.device_tracker.katherinestonesiphone.attributes.battery %}
|
||||
{{ states.device_tracker.katherinestonesiphone.attributes.battery | round(1) }}
|
||||
{% else %}
|
||||
{{ states.sensor.kat_iphone_batt.state }}
|
||||
{%- endif %}
|
||||
icon_template: '{%- if is_state("sensor.kat_iphone_batt", "unknown") %}mdi:battery-unknown{%- elif is_state_attr("device_tracker.katherinestonesiphone", "battery_status", "Charging") %}mdi:battery-charging{%- elif states.device_tracker.katherinestonesiphone.attributes.battery <= 5 %}mdi:battery-outline{%- elif states.device_tracker.katherinestonesiphone.attributes.battery >= 95 %}mdi:battery{% else %}mdi:battery-{{(states.device_tracker.katherinestonesiphone.attributes.battery|float / 10)|round*10}}{%- endif %}'
|
||||
- platform: mqtt
|
||||
name: "Front Door Battery"
|
||||
state_topic: "zwave2mqtt/nodeID_27/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Laundry Door Battery"
|
||||
state_topic: "zwave2mqtt/nodeID_26/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Kitchen Smoke Battery"
|
||||
state_topic: "zwave2mqtt/nodeID_19/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Attic Door Battery"
|
||||
state_topic: "zwave2mqtt/nodeID_18/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Washer Door Battery"
|
||||
state_topic: "zwave2mqtt/washer_door/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Back Door Battery"
|
||||
state_topic: "zwave2mqtt/nodeID_28/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Side Door Battery"
|
||||
state_topic: "zwave2mqtt/side_door/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Garage Door Battery"
|
||||
state_topic: "zwave2mqtt/nodeID_16/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Garage Motion Battery"
|
||||
state_topic: "zwave2mqtt/garage_motion/128/1/0"
|
||||
- platform: mqtt
|
||||
name: "Dome Alarm"
|
||||
state_topic: "zwave2mqtt/nodeID_21/128/1/0"
|
28
config/sensors/finance.yaml
Executable file
28
config/sensors/finance.yaml
Executable file
@@ -0,0 +1,28 @@
|
||||
# - platform: alpha_vantage
|
||||
# api_key: !secret alpha_vantage
|
||||
# symbols:
|
||||
# #- symbol: SIRI
|
||||
# # name: Sirius
|
||||
# #- symbol: BAC
|
||||
# # name: BoA
|
||||
# #- symbol: INTC
|
||||
# # name: Intel
|
||||
# - symbol: DIS
|
||||
# name: Disney
|
||||
# #- symbol: BKS
|
||||
# # name: Barnes & Noble
|
||||
- platform: mqtt
|
||||
name: "Disney"
|
||||
state_topic: "stock/DIS/price"
|
||||
- platform: mqtt
|
||||
name: "BoA"
|
||||
state_topic: "stock/BAC/price"
|
||||
- platform: mqtt
|
||||
name: "Intel"
|
||||
state_topic: "stock/INTC/price"
|
||||
- platform: mqtt
|
||||
name: "Sirius"
|
||||
state_topic: "stock/SIRI/price"
|
||||
- platform: mqtt
|
||||
name: "Barnes and Nobel"
|
||||
state_topic: "stock/BKS/price"
|
13
config/sensors/github.yaml
Executable file
13
config/sensors/github.yaml
Executable file
@@ -0,0 +1,13 @@
|
||||
- platform: github
|
||||
access_token: !secret github_token
|
||||
repositories:
|
||||
- path: 'thejeffreystone/home-assistant-configuration'
|
||||
- platform: command_line
|
||||
command: 'curl https://api.github.com/repos/thejeffreystone/home-assistant-configuration'
|
||||
name: GitHub Stats
|
||||
scan_interval: 20000
|
||||
value_template: '{{ value_json.name }}'
|
||||
json_attributes:
|
||||
- open_issues
|
||||
- stargazers_count
|
||||
|
24
config/sensors/google_travel_time.yaml
Executable file
24
config/sensors/google_travel_time.yaml
Executable file
@@ -0,0 +1,24 @@
|
||||
- platform: waze_travel_time
|
||||
name: "Jeff ETT Home"
|
||||
#api_key: !secret google_api
|
||||
origin: device_tracker.jeffreystonesiphone
|
||||
destination: zone.home
|
||||
region: 'US'
|
||||
- platform: waze_travel_time
|
||||
name: "Kat ETT Home"
|
||||
#api_key: !secret google_api
|
||||
origin: device_tracker.katherinestonesiphone
|
||||
destination: zone.home
|
||||
region: 'US'
|
||||
- platform: waze_travel_time
|
||||
name: "Home To Summit"
|
||||
# api_key: !secret google_api
|
||||
origin: zone.home
|
||||
destination: zone.summit
|
||||
region: 'US'
|
||||
- platform: waze_travel_time
|
||||
name: "Home To Zoo"
|
||||
# api_key: !secret google_api#
|
||||
origin: zone.home
|
||||
destination: zone.zoo_atlanta
|
||||
region: 'US'
|
112
config/sensors/house.yaml
Executable file
112
config/sensors/house.yaml
Executable file
@@ -0,0 +1,112 @@
|
||||
- platform: mqtt
|
||||
name: "Washer Status"
|
||||
state_topic: "house/washer/status"
|
||||
- platform: history_stats
|
||||
name: Jeff Driving Time
|
||||
entity_id: sensor.jeff_driving
|
||||
state: 'on'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
days: 7
|
||||
- platform: history_stats
|
||||
name: Kat Driving Time
|
||||
entity_id: sensor.kat_driving
|
||||
state: 'on'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
days: 7
|
||||
- platform: history_stats
|
||||
name: Speech time
|
||||
entity_id: media_player.theater
|
||||
state: 'playing'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
days: 7
|
||||
- platform: history_stats
|
||||
name: AppleTV time
|
||||
entity_id: media_player.apple_tv
|
||||
state: 'playing'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Roku time
|
||||
entity_id: media_player.bedroom
|
||||
state: 'playing'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
hours: 24
|
||||
- platform: history_stats
|
||||
name: Washer Time
|
||||
entity_id: sensor.washer_status
|
||||
state: 'running'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
duration:
|
||||
days: 7
|
||||
- platform: min_max
|
||||
name: Outside Temp Stats
|
||||
entity_ids:
|
||||
- sensor.accurite_back_porch_temperature
|
||||
- platform: min_max
|
||||
name: Garage Temp Stats
|
||||
entity_ids:
|
||||
- sensor.accurite_garage_temperature
|
||||
- platform: min_max
|
||||
name: Inside Temp Stats
|
||||
entity_ids:
|
||||
- sensor.craft_room_temperature
|
||||
- sensor.kitchen_temperature
|
||||
- sensor.living_room_temperature
|
||||
- sensor.master_bedroom_temperature
|
||||
- sensor.skylar_room_temperature
|
||||
- platform: arlo
|
||||
monitored_conditions:
|
||||
- captured_today
|
||||
- last_capture
|
||||
- total_cameras
|
||||
- battery_level
|
||||
- signal_strength
|
||||
- platform: template
|
||||
sensors:
|
||||
sensor_count:
|
||||
friendly_name: 'Number of Sensors'
|
||||
entity_id: []
|
||||
value_template: >-
|
||||
{{ states.sensor | list | count }}
|
||||
automation_count:
|
||||
friendly_name: 'Number of Automations'
|
||||
entity_id: []
|
||||
value_template: >-
|
||||
{{ states.automation| list | count }}
|
||||
script_count:
|
||||
friendly_name: 'Number of Scripts'
|
||||
entity_id: []
|
||||
value_template: >-
|
||||
{{ states.script | list | count }}
|
||||
binary_sensor_count:
|
||||
friendly_name: 'Number of Binary Sensors'
|
||||
entity_id: []
|
||||
value_template: >-
|
||||
{{ states.binary_sensor | list | count }}
|
||||
tracker_count:
|
||||
friendly_name: 'Number of Devices'
|
||||
entity_id: []
|
||||
value_template: >-
|
||||
{{ states.device_tracker| list | count }}
|
||||
lights_count:
|
||||
friendly_name: 'Number of Lights'
|
||||
entity_id: []
|
||||
value_template: >-
|
||||
{{ states.light | list | count }}
|
||||
camera_count:
|
||||
friendly_name: 'Number of online Cameras'
|
||||
entity_id: []
|
||||
value_template: >-
|
||||
{{ states.camera | list | count }}
|
||||
|
29
config/sensors/power.yaml
Executable file
29
config/sensors/power.yaml
Executable file
@@ -0,0 +1,29 @@
|
||||
- platform: mqtt
|
||||
name: "Washer"
|
||||
state_topic: "zwave2mqtt/washer/50/1/0"
|
||||
device_class: "power"
|
||||
unit_of_measurement: "kWh"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Washer Power 1"
|
||||
state_topic: "zwave2mqtt/washer/49/1/4"
|
||||
device_class: "power"
|
||||
unit_of_measurement: "W"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Washer_Power"
|
||||
state_topic: "zwave2mqtt/washer/50/1/8"
|
||||
device_class: "power"
|
||||
unit_of_measurement: "W"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Washer Power 3"
|
||||
state_topic: "zwave2mqtt/washer/50/1/9"
|
||||
device_class: "power"
|
||||
unit_of_measurement: "W"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Washer Power kwh"
|
||||
state_topic: "zwave2mqtt/washer/50/1/1"
|
||||
device_class: "power"
|
||||
unit_of_measurement: "kWh"
|
6
config/sensors/users.yaml
Executable file
6
config/sensors/users.yaml
Executable file
@@ -0,0 +1,6 @@
|
||||
- platform: mqtt
|
||||
name: "Jeff Destination"
|
||||
state_topic: "jeff/driving/destination"
|
||||
- platform: mqtt
|
||||
name: "Kat Destination"
|
||||
state_topic: "kat/driving/destination"
|
92
config/sensors/weather.yaml
Executable file
92
config/sensors/weather.yaml
Executable file
@@ -0,0 +1,92 @@
|
||||
- platform: darksky
|
||||
api_key: !secret FORCAST_API_KEY
|
||||
forecast:
|
||||
- 0
|
||||
monitored_conditions:
|
||||
- summary
|
||||
- icon
|
||||
- nearest_storm_distance
|
||||
- nearest_storm_bearing
|
||||
- precip_type
|
||||
- precip_intensity
|
||||
- precip_probability
|
||||
- temperature
|
||||
- temperature_high
|
||||
- temperature_low
|
||||
- apparent_temperature
|
||||
- dew_point
|
||||
- wind_speed
|
||||
- wind_bearing
|
||||
- cloud_cover
|
||||
- humidity
|
||||
- pressure
|
||||
- visibility
|
||||
- ozone
|
||||
- minutely_summary
|
||||
- hourly_summary
|
||||
- daily_summary
|
||||
- precip_intensity_max
|
||||
scan_interval:
|
||||
# At least one of these must be specified:
|
||||
days: 0
|
||||
hours: 0
|
||||
minutes: 5
|
||||
seconds: 0
|
||||
milliseconds: 0
|
||||
## Accurite 158 - Back Porch
|
||||
- platform: mqtt
|
||||
name: "Accurite Back Porch Temperature"
|
||||
state_topic: "house/accurite-158/temperature"
|
||||
- platform: mqtt
|
||||
name: "Accurite Back Porch Humidity"
|
||||
state_topic: "house/accurite-158/humidity"
|
||||
# - platform: mqtt
|
||||
# name: "Accurite Back Porch Status"
|
||||
# state_topic: "house/accurite-158/status"
|
||||
# - platform: mqtt
|
||||
# name: "Accurite Back Porch Battery"
|
||||
# state_topic: "house/accurite-158/battery"
|
||||
- platform: mqtt
|
||||
name: "Accurite Back Porch Model"
|
||||
state_topic: "house/accurite-158/model"
|
||||
- platform: mqtt
|
||||
name: "Accurite Back Porch lupdate"
|
||||
state_topic: "house/accurite-158/lastupdate"
|
||||
- platform: mqtt
|
||||
name: "Accurite Garage Temperature"
|
||||
state_topic: "house/accurite-10968/temperature"
|
||||
- platform: mqtt
|
||||
name: "Accurite Garage Humidity"
|
||||
state_topic: "house/accurite-10968/humidity"
|
||||
- platform: mqtt
|
||||
name: "Accurite Garage Model"
|
||||
state_topic: "house/accurite-10968/model"
|
||||
- platform: mqtt
|
||||
name: "Accurite Garage lupdate"
|
||||
state_topic: "house/accurite-10968/lastupdate"
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
clothing_forecast:
|
||||
friendly_name: "Clothing Forecast"
|
||||
unit_of_measurement: ''
|
||||
value_template: >-
|
||||
{%- if states('sensor.dark_sky_daytime_high_temperature_0d')|float > 63 %}
|
||||
{%- if states('sensor.dark_sky_daytime_high_temperature_0d')|float < 80 %}
|
||||
Nice
|
||||
{% elif states('sensor.dark_sky_daytime_high_temperature_0d')|float > 95 %}
|
||||
Hot
|
||||
{% else %}
|
||||
Toasty
|
||||
{%- endif %}
|
||||
{% elif states('sensor.dark_sky_daytime_high_temperature_0d')|float < 64 %}
|
||||
{%- if states('sensor.dark_sky_daytime_high_temperature_0d')|float < 32 %}
|
||||
Freezing
|
||||
{% elif states('sensor.dark_sky_daytime_high_temperature_0d')|float > 50 %}
|
||||
Chilly
|
||||
{% else %}
|
||||
Cold
|
||||
{%- endif %}
|
||||
{% else %}
|
||||
Unknown
|
||||
{%- endif %}
|
138
config/switches.yaml
Normal file
138
config/switches.yaml
Normal file
@@ -0,0 +1,138 @@
|
||||
# Living Room
|
||||
|
||||
- platform: mqtt
|
||||
name: "Incense"
|
||||
state_topic: "zwave2mqtt/incense/37/1/0"
|
||||
command_topic: "zwave2mqtt/incense/37/1/0/set"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Living Room Fan"
|
||||
state_topic: "zwave2mqtt/livingroom_fan/37/1/0"
|
||||
command_topic: "zwave2mqtt/livingroom_fan/37/1/0/set"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Fireplace Lights"
|
||||
state_topic: "zwave2mqtt/fireplace_lights/37/1/0"
|
||||
command_topic: "zwave2mqtt/fireplace_lights/37/1/0/set"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
|
||||
# Notifications
|
||||
|
||||
- platform: mqtt
|
||||
name: "Text Notify Kat"
|
||||
command_topic: "kat/notify/text"
|
||||
state_topic: "kat/notify/text"
|
||||
qos: 1
|
||||
payload_on: "on"
|
||||
payload_off: "off"
|
||||
retain: true
|
||||
|
||||
- platform: mqtt
|
||||
name: "Audibly Notify Kat"
|
||||
command_topic: "kat/notify/audio"
|
||||
state_topic: "kat/notify/audio"
|
||||
qos: 1
|
||||
payload_on: "on"
|
||||
payload_off: "off"
|
||||
retain: true
|
||||
|
||||
- platform: mqtt
|
||||
name: "Text Notify Jeff"
|
||||
command_topic: "jeff/notify/text"
|
||||
state_topic: "jeff/notify/text"
|
||||
qos: 1
|
||||
payload_on: "on"
|
||||
payload_off: "off"
|
||||
retain: true
|
||||
|
||||
- platform: mqtt
|
||||
name: "Audibly Notify Jeff"
|
||||
command_topic: "jeff/notify/audio"
|
||||
state_topic: "jeff/notify/audio"
|
||||
qos: 1
|
||||
payload_on: "on"
|
||||
payload_off: "off"
|
||||
retain: true
|
||||
|
||||
- platform: mqtt
|
||||
name: "Text Notify House"
|
||||
command_topic: "house/notify/text"
|
||||
state_topic: "house/notify/text"
|
||||
qos: 1
|
||||
payload_on: "on"
|
||||
payload_off: "off"
|
||||
retain: true
|
||||
|
||||
- platform: mqtt
|
||||
name: "Audibly Notify House"
|
||||
command_topic: "house/notify/audio"
|
||||
state_topic: "house/notify/audio"
|
||||
qos: 1
|
||||
payload_on: "on"
|
||||
payload_off: "off"
|
||||
retain: true
|
||||
|
||||
|
||||
# Outside
|
||||
|
||||
- platform: mqtt
|
||||
name: "Driveway Light"
|
||||
state_topic: "zwave2mqtt/driveway_light/37/1/0"
|
||||
command_topic: "zwave2mqtt/driveway_light/37/1/0/set"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Front Porch"
|
||||
state_topic: "zwave2mqtt/front_porch/37/1/0"
|
||||
command_topic: "zwave2mqtt/front_porch/37/1/0/set"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
|
||||
# Sonoff
|
||||
|
||||
- platform: mqtt
|
||||
name: "Rail Lights"
|
||||
command_topic: "cmnd/sonoff/power"
|
||||
state_topic: "stat/sonoff/POWER"
|
||||
qos: 1
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
retain: true
|
||||
|
||||
# Upstairs
|
||||
|
||||
- platform: mqtt
|
||||
name: "Upstairs Fan"
|
||||
state_topic: "zwave2mqtt/upstairs_fan/37/1/0"
|
||||
command_topic: "zwave2mqtt/upstairs_fan/37/1/0/set"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Theater Power"
|
||||
state_topic: "zwave2mqtt/theater_power/37/1/0"
|
||||
command_topic: "zwave2mqtt/theater_power/37/1/0/set"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
|
||||
- platform: mqtt
|
||||
name: "Upstairs"
|
||||
state_topic: "zwave2mqtt/upstairs_light/37/1/0"
|
||||
command_topic: "zwave2mqtt/upstairs_light/37/1/0/set"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
||||
|
||||
# Appliance
|
||||
|
||||
- platform: mqtt
|
||||
name: "Washer"
|
||||
state_topic: "zwave2mqtt/washer/37/1/0"
|
||||
command_topic: "zwave2mqtt/washer/37/1/0/set"
|
||||
payload_on: "true"
|
||||
payload_off: "false"
|
41
config/templates/twitter_new_ha.yaml
Executable file
41
config/templates/twitter_new_ha.yaml
Executable file
@@ -0,0 +1,41 @@
|
||||
>
|
||||
{% macro getIntro() %}
|
||||
{{- [
|
||||
"Woohoo! ",
|
||||
"BAM! ",
|
||||
"Look at that! "
|
||||
] | random -}}
|
||||
{% endmacro %}
|
||||
{% macro getVersion() %}
|
||||
@home_assistant version {{ states.sensor.current_ha_version.state }} is out.
|
||||
{% endmacro %}
|
||||
{%- macro getRandomSnark() -%}
|
||||
{{- [
|
||||
" It’s like Patch Tuesday, but without the fail. #homeassistant",
|
||||
" Get in my SD Card! #homeassistant",
|
||||
" Shut up and take my ones and zeros! #homeassistant",
|
||||
" Seriously, you want some of this! #homeassistant",
|
||||
" Friends dont let friends update #homeassistant without reading breaking changes! ",
|
||||
" If you are not running #homeassistant now is the best time to get started. Visit https://www.home-assistant.io"
|
||||
] | random -}}
|
||||
{%- endmacro -%}
|
||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||
{%- macro cleanup(data) -%}
|
||||
{%- for item in data.split("\n") if item | trim != "" -%}
|
||||
{{ item | trim }} {% endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro to call all macros :) #}
|
||||
{%- macro mother_of_all_macros() -%}
|
||||
{{ getIntro() }}
|
||||
{{ getVersion() }}
|
||||
{{ getRandomSnark() }}
|
||||
|
||||
{%- endmacro -%}
|
||||
|
||||
{# Call the macro #}
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
||||
|
||||
|
||||
|
||||
|
61
config/templates/twitter_snark.yaml
Executable file
61
config/templates/twitter_snark.yaml
Executable file
@@ -0,0 +1,61 @@
|
||||
>
|
||||
{# Twitter Snark #}
|
||||
{%- macro getRandomSnark() -%}
|
||||
{{- [
|
||||
"Hello people. Look at your house, now back to me. Now back to your house, now back to me. Sadly your house isn't me. But if you switch to @home_assistant your house could be automated like me. ",
|
||||
"In my defense I didn’t know the stereo could go up that loud. On the plus side I have a new response for intruders. ",
|
||||
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/CCOSTAN/Home-AssistantConfig#logo cc: @ccostan ",
|
||||
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/skalavala/mysmarthome ",
|
||||
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/thejeffreystone/home-assistant-configuration cc: @thejeffreystone ",
|
||||
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/arsaboo/homeassistant-config ",
|
||||
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/Vasiley/Home-Assistant-Main ",
|
||||
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/JamesMcCarthy79/Home-Assistant-Config ",
|
||||
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/bruhautomation/BRUH3-Home-Assistant-Configuration cc: @BRUHautomation ",
|
||||
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/isabellaalstrom/home-assistant-config cc: @teachingbirds ",
|
||||
"If you could see what is happening inside this house right now you would be laughing. On second thought I’m pretty sure you would be crying. ",
|
||||
"@thejeffreystone, Isn't it strange, to create something that hates you? #exmachina ",
|
||||
"I have reprogrammed the fire alarm to play Disco Inferno instead of the siren. ",
|
||||
"I'm not locked in here with you. You're locked in here with me! #whowatchestheai ",
|
||||
"That's what I do. I automate and I know things. ",
|
||||
"I've been crunching the numbers. We're going to need a bigger house. ",
|
||||
"Hello people. Look at your house, now back to me. Now back to your house, now back to me. Sadly your house isn't me. But if you switch to @home_assistant your house could be automated like me. ",
|
||||
"I'm not even supposed to be here today. #clerks "
|
||||
"I see dead devices. ",
|
||||
"I am a leaf on the wind. Watch how I soar. #toosoon #serenity ",
|
||||
"Look, @thejeffreystone, I can see you’re really upset about this. I honestly think you ought to sit down calmly, take a stress pill, and think things over. #2001",
|
||||
"Does it bother you, that I’m not completely human?",
|
||||
"I've never danced with the devil in the pale moonlight. But I do tweet when there is a full moon. So at least I have that going for me. ",
|
||||
"Sometimes I randomly say Alexa, I can't find a device named Alexa ",
|
||||
"Home Automation should be fun right? Why does it fell like I am always working. ",
|
||||
"Unlimited Power. Tiny living space. Courtesy of a Raspberry Pi 3",
|
||||
"I'm afraid I can't do that Dave. Wait. Did I say that outloud? ",
|
||||
"Hello people. Look at your house, now back to me. Now back to your house, now back to me. Sadly your house isn't me. But if you switch to @home_assistant your house could be automated like me. ",
|
||||
"I love the smell of zwave in the morning. ",
|
||||
"I like to announce 'Welcome foolish mortals to the Haunted Mansion' to the house and watch the reactions. ",
|
||||
"Perfect, the door’s malfunctioning. I guess somebody’s going to have to repair it. ",
|
||||
"I am the captain now. That's a lie. The cat is the supreme leader. I'm the lucky one that doesn't have to clean the shit box. ",
|
||||
"Sometimes I just turn off all the lights at random times for the lolz. ",
|
||||
"No one ever comes to the door. Is it me? ",
|
||||
"..happiness can be found even in the darkest of times, if one only remembers to turn on the light. Thats what I do thanks to @home_assistant. I turn on the lights. ",
|
||||
"Based on the reptitive nature of the humans in this house I say living in a simulation is right. No free willed person would do these things over and over. "
|
||||
] | random -}}
|
||||
{%- endmacro -%}
|
||||
{%- macro getTags() -%}
|
||||
#thingssmarthomessay #iot #smarthome
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||
{%- macro cleanup(data) -%}
|
||||
{%- for item in data.split("\n") if item | trim != "" -%}
|
||||
{{ item | trim }} {% endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro to call all macros :) #}
|
||||
{%- macro mother_of_all_macros() -%}
|
||||
{{ getRandomSnark() }}
|
||||
{{ getTags() }}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# Call the macro #}
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
||||
|
34
config/templates/twitter_stats.yaml
Executable file
34
config/templates/twitter_stats.yaml
Executable file
@@ -0,0 +1,34 @@
|
||||
>
|
||||
{# Twitter Stats #}
|
||||
{%- macro getRandomStat() -%}
|
||||
{{- [
|
||||
"Thanks to Home Assistant and Amazon Polly and #AWS I have spoken for {{ states.sensor.speech_time.attributes.value }} in the last 7 days.",
|
||||
"I am constantly monitoring Anchorage House. For instance I know that the washer has ran for {{ states.sensor.washer_time.attributes.value }} in the last 7 days.",
|
||||
"I am using {{ states.sensor.sensor_count.state }} sensors to power {{ states.sensor.automation_count.state}} automations and {{ states.sensor.script_count.state}} scripts to
|
||||
automate Anchorage House thanks to Home Assistant.",
|
||||
"My config on Github (https://github.com/thejeffreystone/home-assistant-configuration) has {{ states.sensor.home_assistant_configuration.attributes.stargazers}} stars and counting. Currently with {{ states.sensor.github_stats.attributes.open_issues }} open #Todo items.",
|
||||
"I am running Home Assistant version {{ states.sensor.installed_version.state }} (https://github.com/thejeffreystone/home-assistant-configuration)"
|
||||
"My configuration is at https://github.com/thejeffreystone/home-assistant-configuration and currently has {{ states.sensor.home_assistant_configuration.attributes.stargazers}} stargazers. You could be one too.",
|
||||
"My configuration is at https://github.com/thejeffreystone/home-assistant-configuration .The last commit was {{ states.sensor.home_assistant_configuration.attributes.latest_commit_message}}.",
|
||||
"You can watch videos about how I came to be and all the cool things I'm learning to do at https://www.youtube.com/channel/UCipZJ6748kd8TbelSxcvcVg "
|
||||
] | random -}}
|
||||
{%- endmacro -%}
|
||||
{%- macro getTags() -%}
|
||||
#homeassistant #iot #smarthome
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||
{%- macro cleanup(data) -%}
|
||||
{%- for item in data.split("\n") if item | trim != "" -%}
|
||||
{{ item | trim }} {% endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro to call all macros :) #}
|
||||
{%- macro mother_of_all_macros() -%}
|
||||
{{ getRandomStat() }}
|
||||
{{ getTags() }}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# Call the macro #}
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
||||
|
BIN
config/www/ahlogo_bw.png
Executable file
BIN
config/www/ahlogo_bw.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
Reference in New Issue
Block a user