mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-16 18:44:58 +00:00
Completely Broke out the Configuration Files
This commit is contained in:
35
Todo.md
Executable file
35
Todo.md
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
#Todo List
|
||||||
|
|
||||||
|
# Break out configuration files. HASS user.
|
||||||
|
|
||||||
|
# AUTOMATE LAMP UPSTAIRS USING ifttt AND Nest thermostat.
|
||||||
|
# Put Dash Buttons out there.
|
||||||
|
# Put door sensor on garage door
|
||||||
|
|
||||||
|
|
||||||
|
### Future Ideas
|
||||||
|
|
||||||
|
# - alias: 'Get Random Time'
|
||||||
|
# trigger:
|
||||||
|
# platform: time
|
||||||
|
# after: '21:00:00'
|
||||||
|
# action:
|
||||||
|
# - service: input_slider.select_value
|
||||||
|
# data_template:
|
||||||
|
# entity_id: input_slider.hour
|
||||||
|
# value: '{{ (range(22, 23) | random) }}'
|
||||||
|
# - service: input_slider.select_value
|
||||||
|
# data_template:
|
||||||
|
# entity_id: input_slider.random_minute
|
||||||
|
# value: '{{ (range(30, 45) | random) }}'
|
||||||
|
# Then simply use that in your light turn off automation:
|
||||||
|
|
||||||
|
# - alias: 'Turn lights off'
|
||||||
|
# trigger:
|
||||||
|
# platform: template
|
||||||
|
# value_template: '{{ now.hour == (states.input_slider.random_hour.state | int) and now.minute == (states.input_slider.random_minute.state | int) }}'
|
||||||
|
# action:
|
||||||
|
# - service: light.turn_off
|
||||||
|
# data:
|
||||||
|
# entity_id: light.hue_color_lamp_1
|
||||||
|
|
8
automation/bad_logins.yaml
Executable file
8
automation/bad_logins.yaml
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
- alias: Login Failure
|
||||||
|
trigger:
|
||||||
|
platform: numeric_state
|
||||||
|
entity_id: sensor.badlogin
|
||||||
|
above: 1
|
||||||
|
action:
|
||||||
|
service: ifttt.trigger
|
||||||
|
data: {"event":"device_status", "value1":"Home Assistant Error: ", "value2":"Login Failure Detected"}
|
15
automation/device_status.yaml
Executable file
15
automation/device_status.yaml
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
- alias: 'Device Status'
|
||||||
|
#This recipe sends a POST to IFTTT Maker channel. IFTTT then sends me a SMS Text with "device_status : Wii is Offline."
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id:
|
||||||
|
- sensor.wii
|
||||||
|
- sensor.tablotv
|
||||||
|
- sensor.hue_hub
|
||||||
|
- sensor.alexa_echo
|
||||||
|
- sensor.rachio
|
||||||
|
- sensor.circle
|
||||||
|
- sensor.skybell
|
||||||
|
action:
|
||||||
|
service: ifttt.trigger
|
||||||
|
data_template: {"event":"device_status", "value1":"{{ trigger.entity_id.split('.')[1] }}", "value2":"{{ trigger.to_state.state }}"}
|
17
automation/good_night.yaml
Executable file
17
automation/good_night.yaml
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
- alias: 'GoodNight - Away Mode'
|
||||||
|
# There is also an IFTTT recipe that shuts down all lights when Nest goes into Away mode. - event_type= Good_Night
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: group.family
|
||||||
|
state: 'not_home'
|
||||||
|
- platform: event
|
||||||
|
event_type: good_night
|
||||||
|
|
||||||
|
condition:
|
||||||
|
condition: state
|
||||||
|
entity_id: group.family
|
||||||
|
state: not_home
|
||||||
|
|
||||||
|
action:
|
||||||
|
service: light.turn_off
|
||||||
|
entity_id: group.all_lights
|
6
automation/heal_zwave.yaml
Executable file
6
automation/heal_zwave.yaml
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
- alias: Heal ZWave Nightly
|
||||||
|
trigger:
|
||||||
|
platform: time
|
||||||
|
after: '2:31:00'
|
||||||
|
action:
|
||||||
|
service: zwave.heal_network
|
7
automation/startup_notification.yaml
Executable file
7
automation/startup_notification.yaml
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
- alias: Startup Notification
|
||||||
|
trigger:
|
||||||
|
platform: event
|
||||||
|
event_type: homeassistant_start
|
||||||
|
action:
|
||||||
|
service: ifttt.trigger
|
||||||
|
data: {"event":"device_status", "value1":"Home Assistant", "value2":"Up and Running"}
|
16
automation/tv_time.yaml
Executable file
16
automation/tv_time.yaml
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
- alias: TV Time
|
||||||
|
trigger:
|
||||||
|
- platform: sun
|
||||||
|
event: sunset
|
||||||
|
offset: '+00:30:00'
|
||||||
|
- platform: event
|
||||||
|
event_type: tv_time
|
||||||
|
|
||||||
|
condition:
|
||||||
|
condition: state
|
||||||
|
entity_id: group.family
|
||||||
|
state: home
|
||||||
|
|
||||||
|
action:
|
||||||
|
service: scene.turn_on
|
||||||
|
entity_id: scene.living_room_tv_time
|
8
automation/update_notification.yaml
Executable file
8
automation/update_notification.yaml
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
- alias: "Update Available Notification"
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: updater.updater
|
||||||
|
action:
|
||||||
|
service: ifttt.trigger
|
||||||
|
data: {"event":"device_status", "value1":"Home Assistant Update: ", "value2":"Available"}
|
||||||
|
|
21
automation/zwave_door_sensor.yaml
Executable file
21
automation/zwave_door_sensor.yaml
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
- alias: ZWave Enerwave Door Sensors Open
|
||||||
|
trigger:
|
||||||
|
platform: event
|
||||||
|
event_type: zwave.node_event
|
||||||
|
event_data:
|
||||||
|
object_id: enerwave_unknown_type0601_id0903_2
|
||||||
|
basic_level: 255
|
||||||
|
action:
|
||||||
|
service: light.turn_off
|
||||||
|
entity_id: light.office_lamp
|
||||||
|
|
||||||
|
- alias: ZWave Enerwave Door Sensors Closed
|
||||||
|
trigger:
|
||||||
|
platform: event
|
||||||
|
event_type: zwave.node_event
|
||||||
|
event_data:
|
||||||
|
object_id: enerwave_unknown_type0601_id0903_2
|
||||||
|
basic_level: 0
|
||||||
|
action:
|
||||||
|
service: light.turn_on
|
||||||
|
entity_id: light.office_lamp
|
@@ -5,93 +5,27 @@ homeassistant:
|
|||||||
elevation: !secret homeassistant_elevation
|
elevation: !secret homeassistant_elevation
|
||||||
unit_system: imperial
|
unit_system: imperial
|
||||||
time_zone: America/New_York
|
time_zone: America/New_York
|
||||||
|
customize: !include_dir_merge_named customize
|
||||||
|
|
||||||
customize:
|
|
||||||
climate.downstairs:
|
|
||||||
friendly_name: 'Nest Downstairs'
|
|
||||||
icon: mdi:air-conditioner
|
|
||||||
climate.upstairs:
|
|
||||||
friendly_name: 'Nest Upstairs'
|
|
||||||
icon: mdi:air-conditioner
|
|
||||||
sensor.dark_sky_precip_intensity:
|
|
||||||
friendly_name: 'Rainfall'
|
|
||||||
sensor.dark_sky_humidity:
|
|
||||||
friendly_name: 'Outdoor Humidity'
|
|
||||||
sensor.dark_sky_temperature:
|
|
||||||
friendly_name: 'Outdoor Temp'
|
|
||||||
sensor.speedtest_download:
|
|
||||||
friendly_name: 'Download'
|
|
||||||
icon: mdi:speedometer
|
|
||||||
sensor.speedtest_upload:
|
|
||||||
friendly_name: 'Upload'
|
|
||||||
icon: mdi:speedometer
|
|
||||||
media_player.roku_1gj361038190:
|
|
||||||
friendly_name: 'Downstairs Main Roku'
|
|
||||||
media_player.roku_1gs3ac111661:
|
|
||||||
friendly_name: 'Upstairs Roku'
|
|
||||||
media_player.roku_2N006T621680:
|
|
||||||
friendly_name: 'Bedroom Roku'
|
|
||||||
sensor.wii:
|
|
||||||
icon: mdi:gamepad-variant
|
|
||||||
sensor.tablotv:
|
|
||||||
icon: mdi:television-guide
|
|
||||||
sensor.hue_hub:
|
|
||||||
icon: mdi:router-wireless
|
|
||||||
sensor.rachio:
|
|
||||||
icon: mdi:spray
|
|
||||||
sensor.circle:
|
|
||||||
icon: mdi:google-circles-group
|
|
||||||
sensor.alexa_echo:
|
|
||||||
icon: mdi:amazon
|
|
||||||
sensor.skybell:
|
|
||||||
icon: mdi:camera-front
|
|
||||||
sensor.samsungtv:
|
|
||||||
icon: mdi:television
|
|
||||||
sensor.since_last_boot_templated:
|
|
||||||
friendly_name: 'HomeAssistant Uptime'
|
|
||||||
icon: mdi:clock-start
|
|
||||||
sensor.since_last_boot:
|
|
||||||
hidden: true
|
|
||||||
sensor.badlogin:
|
|
||||||
hidden: true
|
|
||||||
device_tracker.tablotv:
|
|
||||||
hidden: true
|
|
||||||
device_tracker.hue_hub:
|
|
||||||
hidden: true
|
|
||||||
device_tracker.wii:
|
|
||||||
hidden: true
|
|
||||||
device_tracker.rachio:
|
|
||||||
hidden: true
|
|
||||||
device_tracker.circle:
|
|
||||||
hidden: true
|
|
||||||
device_tracker.alexa_echo:
|
|
||||||
hidden: true
|
|
||||||
device_tracker.skybell:
|
|
||||||
hidden: true
|
|
||||||
device_tracker.samsungtv:
|
|
||||||
hidden: true
|
|
||||||
|
|
||||||
http:
|
http:
|
||||||
api_password: !secret http_api_password
|
api_password: !secret http_api_password
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
group: !include_dir_merge_named group
|
||||||
|
device_tracker: !include_dir_merge_list device_tracker
|
||||||
discovery:
|
discovery:
|
||||||
|
sun:
|
||||||
|
|
||||||
light:
|
light:
|
||||||
platform: hue
|
platform: hue
|
||||||
host: 192.168.10.101
|
host: 192.168.10.106
|
||||||
allow_unreachable: true
|
allow_unreachable: true
|
||||||
|
|
||||||
ifttt:
|
ifttt:
|
||||||
key: !secret ifttt_key
|
key: !secret ifttt_key
|
||||||
|
|
||||||
device_tracker:
|
|
||||||
platform: nmap_tracker
|
|
||||||
hosts: 192.168.10.100-254
|
|
||||||
track_new_devices: no
|
|
||||||
# consider_home: 1800 - Added to known_devices.yaml instead on a device by device basis.
|
|
||||||
|
|
||||||
frontend:
|
|
||||||
# history:
|
# history:
|
||||||
|
|
||||||
logbook:
|
logbook:
|
||||||
exclude:
|
exclude:
|
||||||
entities:
|
entities:
|
||||||
@@ -99,8 +33,8 @@ logbook:
|
|||||||
- sensor.since_last_boot_templated
|
- sensor.since_last_boot_templated
|
||||||
#logger:
|
#logger:
|
||||||
# default: info
|
# default: info
|
||||||
|
recorder:
|
||||||
sun:
|
purge_days: 14
|
||||||
|
|
||||||
mqtt:
|
mqtt:
|
||||||
broker: 127.0.0.1
|
broker: 127.0.0.1
|
||||||
@@ -112,24 +46,6 @@ mqtt:
|
|||||||
zwave:
|
zwave:
|
||||||
usb_path: /dev/ttyACM0
|
usb_path: /dev/ttyACM0
|
||||||
config_path: /srv/hass/hass_venv/lib/python3.4/site-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/config
|
config_path: /srv/hass/hass_venv/lib/python3.4/site-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/config
|
||||||
|
|
||||||
sensor forecast:
|
|
||||||
platform: darksky
|
|
||||||
api_key: !secret forecast_key
|
|
||||||
|
|
||||||
monitored_conditions:
|
|
||||||
- summary
|
|
||||||
# - precip_type
|
|
||||||
- precip_intensity
|
|
||||||
- temperature
|
|
||||||
# - dew_point
|
|
||||||
# - wind_speed
|
|
||||||
# - wind_bearing
|
|
||||||
# - cloud_cover
|
|
||||||
- humidity
|
|
||||||
# - pressure
|
|
||||||
# - visibility
|
|
||||||
# - ozone
|
|
||||||
|
|
||||||
nest:
|
nest:
|
||||||
username: !secret nest_username
|
username: !secret nest_username
|
||||||
@@ -140,364 +56,8 @@ climate:
|
|||||||
|
|
||||||
media_player:
|
media_player:
|
||||||
platform: cast
|
platform: cast
|
||||||
|
|
||||||
recorder:
|
sensor: !include_dir_merge_list sensor
|
||||||
purge_days: 14
|
automation: !include_dir_merge_list automation
|
||||||
|
scene: !include_dir_merge_list scene
|
||||||
sensor Speedtest:
|
switch: !include_dir_merge_list switch
|
||||||
platform: speedtest
|
|
||||||
minute: 30
|
|
||||||
hour:
|
|
||||||
- 0
|
|
||||||
- 6
|
|
||||||
- 12
|
|
||||||
- 18
|
|
||||||
monitored_conditions:
|
|
||||||
- download
|
|
||||||
- upload
|
|
||||||
|
|
||||||
# emulated_hue:
|
|
||||||
# host_ip: 192.168.10.10
|
|
||||||
# listen_port: 8300
|
|
||||||
# off_maps_to_on_domains:
|
|
||||||
# - script
|
|
||||||
# - scene
|
|
||||||
|
|
||||||
# A comma separated list of states that have to be tracked as a single group
|
|
||||||
# Grouped states should share the same type of states (ON/OFF or HOME/NOT_HOME)
|
|
||||||
group: !include_dir_merge_named group
|
|
||||||
|
|
||||||
|
|
||||||
switch:
|
|
||||||
platform: rpi_rf
|
|
||||||
gpio: 17
|
|
||||||
switches:
|
|
||||||
Outlet_Living_Room:
|
|
||||||
protocol: 1
|
|
||||||
pulselength: 186
|
|
||||||
code_on: 5265155
|
|
||||||
code_off: 5265164
|
|
||||||
Outlet_2:
|
|
||||||
protocol: 1
|
|
||||||
pulselength: 186
|
|
||||||
code_on: 5264835
|
|
||||||
code_off: 5264844
|
|
||||||
Outlet_Garage:
|
|
||||||
protocol: 1
|
|
||||||
pulselength: 186
|
|
||||||
code_on: 5264691
|
|
||||||
code_off: 5264700
|
|
||||||
|
|
||||||
sensor Devices:
|
|
||||||
platform: template
|
|
||||||
sensors:
|
|
||||||
wii:
|
|
||||||
friendly_name: 'Wii'
|
|
||||||
value_template: >-
|
|
||||||
{%- if is_state("device_tracker.wii", "home") %}
|
|
||||||
Online
|
|
||||||
{% else %}
|
|
||||||
Offline
|
|
||||||
{%- endif %}
|
|
||||||
tablotv:
|
|
||||||
friendly_name: 'Tablo TV'
|
|
||||||
value_template: >-
|
|
||||||
{%- if is_state("device_tracker.tablotv", "home") %}
|
|
||||||
Online
|
|
||||||
{% else %}
|
|
||||||
Offline
|
|
||||||
{%- endif %}
|
|
||||||
hue_hub:
|
|
||||||
friendly_name: 'Hue Hub'
|
|
||||||
value_template: >-
|
|
||||||
{%- if is_state("device_tracker.hue_hub", "home") %}
|
|
||||||
Online
|
|
||||||
{% else %}
|
|
||||||
Offline
|
|
||||||
{%- endif %}
|
|
||||||
alexa_echo:
|
|
||||||
friendly_name: 'Alexa Echo'
|
|
||||||
value_template: >-
|
|
||||||
{%- if is_state("device_tracker.alexa_echo", "home") %}
|
|
||||||
Online
|
|
||||||
{% else %}
|
|
||||||
Offline
|
|
||||||
{%- endif %}
|
|
||||||
circle:
|
|
||||||
friendly_name: 'Disney Circle'
|
|
||||||
value_template: >-
|
|
||||||
{%- if is_state("device_tracker.circle", "home") %}
|
|
||||||
Online
|
|
||||||
{% else %}
|
|
||||||
Offline
|
|
||||||
{%- endif %}
|
|
||||||
rachio:
|
|
||||||
friendly_name: 'Rachio Sprinklers'
|
|
||||||
value_template: >-
|
|
||||||
{%- if is_state("device_tracker.rachio", "home") %}
|
|
||||||
Online
|
|
||||||
{% else %}
|
|
||||||
Offline
|
|
||||||
{%- endif %}
|
|
||||||
skybell:
|
|
||||||
friendly_name: 'Skybell Doorbell'
|
|
||||||
value_template: >-
|
|
||||||
{%- if is_state("device_tracker.skybell", "home") %}
|
|
||||||
Online
|
|
||||||
{% else %}
|
|
||||||
Offline
|
|
||||||
{%- endif %}
|
|
||||||
samsungtv:
|
|
||||||
friendly_name: 'Samsung TV'
|
|
||||||
value_template: >-
|
|
||||||
{%- if is_state("device_tracker.samsungtv", "home") %}
|
|
||||||
Online
|
|
||||||
{% else %}
|
|
||||||
Offline
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
|
|
||||||
sensor Login_Failures:
|
|
||||||
platform: command_line
|
|
||||||
command: "grep -c invalidpassword /home/hass/.homeassistant/home-assistant.log"
|
|
||||||
name: badlogin
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: systemmonitor
|
|
||||||
resources:
|
|
||||||
# - type: last_boot
|
|
||||||
- type: since_last_boot
|
|
||||||
|
|
||||||
- platform: template
|
|
||||||
sensors:
|
|
||||||
since_last_boot_templated:
|
|
||||||
value_template: >-
|
|
||||||
{%- set slb = states.sensor.since_last_boot.state.split(' ') -%}
|
|
||||||
{%- set count = slb | length -%}
|
|
||||||
{%- set hms = slb[count - 1] -%}
|
|
||||||
{%- set hms_trimmed = hms.split('.')[0] -%}
|
|
||||||
{%- set hms_split = hms_trimmed.split(':') -%}
|
|
||||||
{%- set hours = hms_split[0] | int -%}
|
|
||||||
{%- set minutes = hms_split[1] | int -%}
|
|
||||||
{%- set seconds = hms_split[2] | int -%}
|
|
||||||
|
|
||||||
{%- if count == 3 -%}
|
|
||||||
{{ slb[0] ~ ' ' ~ slb[1] ~ ' ' }}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if hours > 0 -%}
|
|
||||||
{%- if hours == 1 -%}
|
|
||||||
1 hour
|
|
||||||
{%- else -%}
|
|
||||||
{{ hours }} hours
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if minutes > 0 -%}
|
|
||||||
{%- if hours > 0 -%}
|
|
||||||
{{ ', ' }}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if minutes == 1 -%}
|
|
||||||
1 minute
|
|
||||||
{%- else -%}
|
|
||||||
{{ minutes }} minutes
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if seconds > 0 -%}
|
|
||||||
{%- if hours > 0 or minutes > 0 -%}
|
|
||||||
{{ ', ' }}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if seconds == 1 -%}
|
|
||||||
1 second
|
|
||||||
{%- else -%}
|
|
||||||
{{ seconds }} seconds
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
|
|
||||||
automation:
|
|
||||||
- alias: Heal ZWave Nightly
|
|
||||||
trigger:
|
|
||||||
platform: time
|
|
||||||
after: '2:31:00'
|
|
||||||
action:
|
|
||||||
service: zwave.heal_network
|
|
||||||
|
|
||||||
- alias: "Update Available Notification"
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: updater.updater
|
|
||||||
action:
|
|
||||||
service: ifttt.trigger
|
|
||||||
data: {"event":"device_status", "value1":"Home Assistant Update: ", "value2":"Available"}
|
|
||||||
|
|
||||||
- alias: Login Failure
|
|
||||||
trigger:
|
|
||||||
platform: numeric_state
|
|
||||||
entity_id: sensor.badlogin
|
|
||||||
above: 1
|
|
||||||
action:
|
|
||||||
service: ifttt.trigger
|
|
||||||
data: {"event":"device_status", "value1":"Home Assistant Error: ", "value2":"Login Failure Detected"}
|
|
||||||
|
|
||||||
- alias: 'Device Status'
|
|
||||||
#This recipe sends a POST to IFTTT Maker channel. IFTTT then sends me a SMS Text with "device_status : Wii is Offline."
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id:
|
|
||||||
- sensor.wii
|
|
||||||
- sensor.tablotv
|
|
||||||
- sensor.hue_hub
|
|
||||||
- sensor.alexa_echo
|
|
||||||
- sensor.rachio
|
|
||||||
- sensor.circle
|
|
||||||
- sensor.skybell
|
|
||||||
action:
|
|
||||||
service: ifttt.trigger
|
|
||||||
data_template: {"event":"device_status", "value1":"{{ trigger.entity_id.split('.')[1] }}", "value2":"{{ trigger.to_state.state }}"}
|
|
||||||
|
|
||||||
- alias: Startup Notification
|
|
||||||
trigger:
|
|
||||||
platform: event
|
|
||||||
event_type: homeassistant_start
|
|
||||||
action:
|
|
||||||
service: ifttt.trigger
|
|
||||||
data: {"event":"device_status", "value1":"Home Assistant", "value2":"Up and Running"}
|
|
||||||
|
|
||||||
- alias: 'GoodNight - Away Mode'
|
|
||||||
# There is also an IFTTT recipe that shuts down all lights when Nest goes into Away mode. - event_type= Good_Night
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id: group.family
|
|
||||||
state: 'not_home'
|
|
||||||
- platform: event
|
|
||||||
event_type: good_night
|
|
||||||
|
|
||||||
condition:
|
|
||||||
condition: state
|
|
||||||
entity_id: group.family
|
|
||||||
state: not_home
|
|
||||||
|
|
||||||
action:
|
|
||||||
service: light.turn_off
|
|
||||||
entity_id: group.all_lights
|
|
||||||
|
|
||||||
- alias: ZWave Enerwave Door Sensors Open
|
|
||||||
trigger:
|
|
||||||
platform: event
|
|
||||||
event_type: zwave.node_event
|
|
||||||
event_data:
|
|
||||||
object_id: enerwave_unknown_type0601_id0903_2
|
|
||||||
basic_level: 255
|
|
||||||
action:
|
|
||||||
service: light.turn_off
|
|
||||||
entity_id: light.office_lamp
|
|
||||||
|
|
||||||
- alias: ZWave Enerwave Door Sensors Closed
|
|
||||||
trigger:
|
|
||||||
platform: event
|
|
||||||
event_type: zwave.node_event
|
|
||||||
event_data:
|
|
||||||
object_id: enerwave_unknown_type0601_id0903_2
|
|
||||||
basic_level: 0
|
|
||||||
action:
|
|
||||||
service: light.turn_on
|
|
||||||
entity_id: light.office_lamp
|
|
||||||
|
|
||||||
- alias: TV Time
|
|
||||||
trigger:
|
|
||||||
- platform: sun
|
|
||||||
event: sunset
|
|
||||||
offset: '+00:30:00'
|
|
||||||
- platform: event
|
|
||||||
event_type: tv_time
|
|
||||||
|
|
||||||
condition:
|
|
||||||
condition: state
|
|
||||||
entity_id: group.family
|
|
||||||
state: home
|
|
||||||
|
|
||||||
action:
|
|
||||||
service: scene.turn_on
|
|
||||||
entity_id: scene.living_room_tv_time
|
|
||||||
|
|
||||||
scene:
|
|
||||||
- name: Living Room TV Time
|
|
||||||
entities:
|
|
||||||
light.dinette_light_1:
|
|
||||||
state: off
|
|
||||||
transition: 10
|
|
||||||
light.dinette_light_2:
|
|
||||||
state: off
|
|
||||||
transition: 10
|
|
||||||
light.living_room_front_left:
|
|
||||||
state: off
|
|
||||||
transition: 10
|
|
||||||
light.living_room_front_right:
|
|
||||||
state: off
|
|
||||||
transition: 10
|
|
||||||
light.living_room_slider:
|
|
||||||
state: off
|
|
||||||
transition: 10
|
|
||||||
light.living_room_back_right:
|
|
||||||
state: on
|
|
||||||
transition: 10
|
|
||||||
brightness: 1
|
|
||||||
light.living_room_back_left:
|
|
||||||
state: on
|
|
||||||
transition: 40
|
|
||||||
brightness: 1
|
|
||||||
light.living_room_couch_1:
|
|
||||||
state: on
|
|
||||||
transition: 400
|
|
||||||
xy_color: [0.6621,0.3023]
|
|
||||||
brightness: 255
|
|
||||||
light.living_room_couch_2:
|
|
||||||
state: on
|
|
||||||
transition: 400
|
|
||||||
xy_color: [0.6621,0.3023]
|
|
||||||
brightness: 255
|
|
||||||
light.couch_tv_light:
|
|
||||||
state: on
|
|
||||||
transition: 400
|
|
||||||
xy_color: [0.6621,0.3023]
|
|
||||||
brightness: 100
|
|
||||||
|
|
||||||
|
|
||||||
# Restart Homebridge on HASS start
|
|
||||||
# shell_command:
|
|
||||||
# restart_homebridge: 'sudo su pi -c "pm2 restart homebridge"'
|
|
||||||
# start_homebridge: 'sudo su pi -c "pm2 start homebridge"'
|
|
||||||
# stop_homebridge: 'sudo su pi -c "pm2 stop homebridge"'
|
|
||||||
|
|
||||||
### Future Ideas
|
|
||||||
|
|
||||||
# - alias: 'Get Random Time'
|
|
||||||
# trigger:
|
|
||||||
# platform: time
|
|
||||||
# after: '21:00:00'
|
|
||||||
# action:
|
|
||||||
# - service: input_slider.select_value
|
|
||||||
# data_template:
|
|
||||||
# entity_id: input_slider.hour
|
|
||||||
# value: '{{ (range(22, 23) | random) }}'
|
|
||||||
# - service: input_slider.select_value
|
|
||||||
# data_template:
|
|
||||||
# entity_id: input_slider.random_minute
|
|
||||||
# value: '{{ (range(30, 45) | random) }}'
|
|
||||||
# Then simply use that in your light turn off automation:
|
|
||||||
|
|
||||||
# - alias: 'Turn lights off'
|
|
||||||
# trigger:
|
|
||||||
# platform: template
|
|
||||||
# value_template: '{{ now.hour == (states.input_slider.random_hour.state | int) and now.minute == (states.input_slider.random_minute.state | int) }}'
|
|
||||||
# action:
|
|
||||||
# - service: light.turn_off
|
|
||||||
# data:
|
|
||||||
# entity_id: light.hue_color_lamp_1
|
|
||||||
|
|
||||||
|
|
||||||
#Todo List
|
|
||||||
|
|
||||||
# Break out configuration files. HASS user.
|
|
||||||
|
|
||||||
# AUTOMATE LAMP UPSTAIRS USING ifttt AND Nest thermostat.
|
|
||||||
# Put Dash Buttons out there.
|
|
||||||
# Put door sensor on garage door
|
|
||||||
|
7
customize/darksky.yaml
Executable file
7
customize/darksky.yaml
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
sensor.dark_sky_precip_intensity:
|
||||||
|
friendly_name: 'Rainfall'
|
||||||
|
sensor.dark_sky_humidity:
|
||||||
|
friendly_name: 'Outdoor Humidity'
|
||||||
|
sensor.dark_sky_temperature:
|
||||||
|
friendly_name: 'Outdoor Temp'
|
||||||
|
|
9
customize/homeassistant.yaml
Executable file
9
customize/homeassistant.yaml
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
sensor.since_last_boot_templated:
|
||||||
|
friendly_name: 'HomeAssistant Uptime'
|
||||||
|
icon: mdi:clock-start
|
||||||
|
|
||||||
|
sensor.since_last_boot:
|
||||||
|
hidden: true
|
||||||
|
|
||||||
|
sensor.badlogin:
|
||||||
|
hidden: true
|
13
customize/internet.yaml
Executable file
13
customize/internet.yaml
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
sensor.speedtest_download:
|
||||||
|
friendly_name: 'Download'
|
||||||
|
icon: mdi:speedometer
|
||||||
|
|
||||||
|
sensor.speedtest_upload:
|
||||||
|
friendly_name: 'Upload'
|
||||||
|
icon: mdi:speedometer
|
||||||
|
|
||||||
|
sensor.circle:
|
||||||
|
icon: mdi:google-circles-group
|
||||||
|
device_tracker.circle:
|
||||||
|
hidden: true
|
||||||
|
|
7
customize/nest.yaml
Executable file
7
customize/nest.yaml
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
climate.downstairs:
|
||||||
|
friendly_name: 'Nest Downstairs'
|
||||||
|
icon: mdi:air-conditioner
|
||||||
|
climate.upstairs:
|
||||||
|
friendly_name: 'Nest Upstairs'
|
||||||
|
icon: mdi:air-conditioner
|
||||||
|
|
24
customize/others.yaml
Executable file
24
customize/others.yaml
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
sensor.hue_hub:
|
||||||
|
icon: mdi:router-wireless
|
||||||
|
device_tracker.hue_hub:
|
||||||
|
hidden: true
|
||||||
|
|
||||||
|
sensor.rachio:
|
||||||
|
icon: mdi:spray
|
||||||
|
device_tracker.rachio:
|
||||||
|
hidden: true
|
||||||
|
|
||||||
|
sensor.alexa_echo:
|
||||||
|
icon: mdi:amazon
|
||||||
|
device_tracker.alexa_echo:
|
||||||
|
hidden: true
|
||||||
|
|
||||||
|
sensor.skybell:
|
||||||
|
icon: mdi:camera-front
|
||||||
|
device_tracker.skybell:
|
||||||
|
hidden: true
|
||||||
|
|
||||||
|
sensor.samsungtv:
|
||||||
|
icon: mdi:television
|
||||||
|
device_tracker.samsungtv:
|
||||||
|
hidden: true
|
11
customize/rokus.yaml
Executable file
11
customize/rokus.yaml
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
media_player.roku_1gj361038190:
|
||||||
|
friendly_name: 'Downstairs Main Roku'
|
||||||
|
media_player.roku_1gs3ac111661:
|
||||||
|
friendly_name: 'Upstairs Roku'
|
||||||
|
media_player.roku_2N006T621680:
|
||||||
|
friendly_name: 'Bedroom Roku'
|
||||||
|
|
||||||
|
device_tracker.tablotv:
|
||||||
|
hidden: true
|
||||||
|
sensor.tablotv:
|
||||||
|
icon: mdi:television-guide
|
4
customize/wii.yaml
Executable file
4
customize/wii.yaml
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
sensor.wii:
|
||||||
|
icon: mdi:gamepad-variant
|
||||||
|
device_tracker.wii:
|
||||||
|
hidden: true
|
4
device_tracker/nmap.yaml
Executable file
4
device_tracker/nmap.yaml
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
- platform: nmap_tracker
|
||||||
|
hosts: 192.168.10.100-254
|
||||||
|
track_new_devices: no
|
||||||
|
# consider_home: 1800 - Added to known_devices.yaml instead on a device by device basis.
|
40
scene/tv_time.yaml
Executable file
40
scene/tv_time.yaml
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
- name: Living Room TV Time
|
||||||
|
entities:
|
||||||
|
light.dinette_light_1:
|
||||||
|
state: off
|
||||||
|
transition: 10
|
||||||
|
light.dinette_light_2:
|
||||||
|
state: off
|
||||||
|
transition: 10
|
||||||
|
light.living_room_front_left:
|
||||||
|
state: off
|
||||||
|
transition: 10
|
||||||
|
light.living_room_front_right:
|
||||||
|
state: off
|
||||||
|
transition: 10
|
||||||
|
light.living_room_slider:
|
||||||
|
state: off
|
||||||
|
transition: 10
|
||||||
|
light.living_room_back_right:
|
||||||
|
state: on
|
||||||
|
transition: 10
|
||||||
|
brightness: 1
|
||||||
|
light.living_room_back_left:
|
||||||
|
state: on
|
||||||
|
transition: 40
|
||||||
|
brightness: 1
|
||||||
|
light.living_room_couch_1:
|
||||||
|
state: on
|
||||||
|
transition: 400
|
||||||
|
xy_color: [0.6621,0.3023]
|
||||||
|
brightness: 255
|
||||||
|
light.living_room_couch_2:
|
||||||
|
state: on
|
||||||
|
transition: 400
|
||||||
|
xy_color: [0.6621,0.3023]
|
||||||
|
brightness: 255
|
||||||
|
light.couch_tv_light:
|
||||||
|
state: on
|
||||||
|
transition: 400
|
||||||
|
xy_color: [0.6621,0.3023]
|
||||||
|
brightness: 100
|
66
sensor/devices.yaml
Executable file
66
sensor/devices.yaml
Executable file
@@ -0,0 +1,66 @@
|
|||||||
|
- platform: template
|
||||||
|
sensors:
|
||||||
|
wii:
|
||||||
|
friendly_name: 'Wii'
|
||||||
|
value_template: >-
|
||||||
|
{%- if is_state("device_tracker.wii", "home") %}
|
||||||
|
Online
|
||||||
|
{% else %}
|
||||||
|
Offline
|
||||||
|
{%- endif %}
|
||||||
|
tablotv:
|
||||||
|
friendly_name: 'Tablo TV'
|
||||||
|
value_template: >-
|
||||||
|
{%- if is_state("device_tracker.tablotv", "home") %}
|
||||||
|
Online
|
||||||
|
{% else %}
|
||||||
|
Offline
|
||||||
|
{%- endif %}
|
||||||
|
hue_hub:
|
||||||
|
friendly_name: 'Hue Hub'
|
||||||
|
value_template: >-
|
||||||
|
{%- if is_state("device_tracker.hue_hub", "home") %}
|
||||||
|
Online
|
||||||
|
{% else %}
|
||||||
|
Offline
|
||||||
|
{%- endif %}
|
||||||
|
alexa_echo:
|
||||||
|
friendly_name: 'Alexa Echo'
|
||||||
|
value_template: >-
|
||||||
|
{%- if is_state("device_tracker.alexa_echo", "home") %}
|
||||||
|
Online
|
||||||
|
{% else %}
|
||||||
|
Offline
|
||||||
|
{%- endif %}
|
||||||
|
circle:
|
||||||
|
friendly_name: 'Disney Circle'
|
||||||
|
value_template: >-
|
||||||
|
{%- if is_state("device_tracker.circle", "home") %}
|
||||||
|
Online
|
||||||
|
{% else %}
|
||||||
|
Offline
|
||||||
|
{%- endif %}
|
||||||
|
rachio:
|
||||||
|
friendly_name: 'Rachio Sprinklers'
|
||||||
|
value_template: >-
|
||||||
|
{%- if is_state("device_tracker.rachio", "home") %}
|
||||||
|
Online
|
||||||
|
{% else %}
|
||||||
|
Offline
|
||||||
|
{%- endif %}
|
||||||
|
skybell:
|
||||||
|
friendly_name: 'Skybell Doorbell'
|
||||||
|
value_template: >-
|
||||||
|
{%- if is_state("device_tracker.skybell", "home") %}
|
||||||
|
Online
|
||||||
|
{% else %}
|
||||||
|
Offline
|
||||||
|
{%- endif %}
|
||||||
|
samsungtv:
|
||||||
|
friendly_name: 'Samsung TV'
|
||||||
|
value_template: >-
|
||||||
|
{%- if is_state("device_tracker.samsungtv", "home") %}
|
||||||
|
Online
|
||||||
|
{% else %}
|
||||||
|
Offline
|
||||||
|
{%- endif %}
|
10
sensor/speedtest.yaml
Executable file
10
sensor/speedtest.yaml
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
- platform: speedtest
|
||||||
|
minute: 30
|
||||||
|
hour:
|
||||||
|
- 0
|
||||||
|
- 6
|
||||||
|
- 12
|
||||||
|
- 18
|
||||||
|
monitored_conditions:
|
||||||
|
- download
|
||||||
|
- upload
|
52
sensor/systemmonitor.yaml
Executable file
52
sensor/systemmonitor.yaml
Executable file
@@ -0,0 +1,52 @@
|
|||||||
|
- platform: command_line
|
||||||
|
command: "grep -c invalidpassword /home/hass/.homeassistant/home-assistant.log"
|
||||||
|
name: badlogin
|
||||||
|
|
||||||
|
- platform: systemmonitor
|
||||||
|
resources:
|
||||||
|
# - type: last_boot
|
||||||
|
- type: since_last_boot
|
||||||
|
|
||||||
|
- platform: template
|
||||||
|
sensors:
|
||||||
|
since_last_boot_templated:
|
||||||
|
value_template: >-
|
||||||
|
{%- set slb = states.sensor.since_last_boot.state.split(' ') -%}
|
||||||
|
{%- set count = slb | length -%}
|
||||||
|
{%- set hms = slb[count - 1] -%}
|
||||||
|
{%- set hms_trimmed = hms.split('.')[0] -%}
|
||||||
|
{%- set hms_split = hms_trimmed.split(':') -%}
|
||||||
|
{%- set hours = hms_split[0] | int -%}
|
||||||
|
{%- set minutes = hms_split[1] | int -%}
|
||||||
|
{%- set seconds = hms_split[2] | int -%}
|
||||||
|
|
||||||
|
{%- if count == 3 -%}
|
||||||
|
{{ slb[0] ~ ' ' ~ slb[1] ~ ' ' }}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if hours > 0 -%}
|
||||||
|
{%- if hours == 1 -%}
|
||||||
|
1 hour
|
||||||
|
{%- else -%}
|
||||||
|
{{ hours }} hours
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if minutes > 0 -%}
|
||||||
|
{%- if hours > 0 -%}
|
||||||
|
{{ ', ' }}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if minutes == 1 -%}
|
||||||
|
1 minute
|
||||||
|
{%- else -%}
|
||||||
|
{{ minutes }} minutes
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if seconds > 0 -%}
|
||||||
|
{%- if hours > 0 or minutes > 0 -%}
|
||||||
|
{{ ', ' }}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if seconds == 1 -%}
|
||||||
|
1 second
|
||||||
|
{%- else -%}
|
||||||
|
{{ seconds }} seconds
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
16
sensor/weather.yaml
Executable file
16
sensor/weather.yaml
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
- platform: darksky
|
||||||
|
api_key: !secret forecast_key
|
||||||
|
|
||||||
|
monitored_conditions:
|
||||||
|
- summary
|
||||||
|
# - precip_type
|
||||||
|
- precip_intensity
|
||||||
|
- temperature
|
||||||
|
# - dew_point
|
||||||
|
# - wind_speed
|
||||||
|
# - wind_bearing
|
||||||
|
# - cloud_cover
|
||||||
|
- humidity
|
||||||
|
# - pressure
|
||||||
|
# - visibility
|
||||||
|
# - ozone
|
6
shell_scripts/homebridge_commands.txt
Executable file
6
shell_scripts/homebridge_commands.txt
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
# Restart Homebridge on HASS start
|
||||||
|
# shell_command:
|
||||||
|
# restart_homebridge: 'sudo su pi -c "pm2 restart homebridge"'
|
||||||
|
# start_homebridge: 'sudo su pi -c "pm2 start homebridge"'
|
||||||
|
# stop_homebridge: 'sudo su pi -c "pm2 stop homebridge"'
|
||||||
|
|
18
switch/rf_outlets.yaml
Executable file
18
switch/rf_outlets.yaml
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
- platform: rpi_rf
|
||||||
|
gpio: 17
|
||||||
|
switches:
|
||||||
|
Outlet_Living_Room:
|
||||||
|
protocol: 1
|
||||||
|
pulselength: 186
|
||||||
|
code_on: 5265155
|
||||||
|
code_off: 5265164
|
||||||
|
Outlet_2:
|
||||||
|
protocol: 1
|
||||||
|
pulselength: 186
|
||||||
|
code_on: 5264835
|
||||||
|
code_off: 5264844
|
||||||
|
Outlet_Garage:
|
||||||
|
protocol: 1
|
||||||
|
pulselength: 186
|
||||||
|
code_on: 5264691
|
||||||
|
code_off: 5264700
|
Reference in New Issue
Block a user