initial push

This commit is contained in:
CeeWeasel
2024-04-14 14:08:56 -04:00
commit 53bf393d14
1111 changed files with 71730 additions and 0 deletions
+194
View File
@@ -0,0 +1,194 @@
--- ###### CUSTOMIZE ----------------------------------------
# RESOURCES:
# Credit to /u/dsgraham on Reddit - https://www.reddit.com/r/homeassistant/comments/9n0llr/google_ambient_sound_urls/
# Script adapted from Bob_NL on Home Assistant Forums - https://community.home-assistant.io/t/chromecast-radio-with-station-and-player-selection/12732
# Google webpage: https://support.google.com/googlehome/answer/7364558?hl=en
# Updating to use DLNA
homeassistant:
customize:
script.ambientsounds:
icon: mdi:play
friendly_name: Start Playing
###### GROUPS ----------------------------------------
group:
Ambient Sounds:
name: Ambient Sounds
entities:
- input_select.ambient_sound
- input_select.google_home
- script.ambientsounds
- input_number.volume_ambientsounds
Home Group:
name: Home Group
entities:
- media_player.great_room
- media_player.kitchen
- media_player.front_room_hub
- media_player.nursery_hub
- media_player.bathroom_mini
- media_player.master_bedroom_clock
- media_player.computer_area_hub
###### INPUT SELECT ------------------------------------------
input_select:
ambient_sound:
name: "Select Radio Station:"
options:
- Random White Noise
- Random Kids Noise
- Babbling Brook
- Female Baby Shusher
- Male Baby Shusher
- Country Night
- Fireplace
- Forest
- Female Lullaby
- Male Lullaby
- Ocean
- Oscillating Fan
- Pink Noise
- Rain
- River
- Female Rock-a-bye Baby
- Male Rock-a-bye Baby
- Thunderstorm
- Female Twinkle Twinkle
- Male Twinkle Twinkle
- White Noise
google_home:
name: "Select Speakers:"
options:
- Front Room
- Master Bedroom
- Kitchen
- Nursery
- Computer Area
- Downstairs
- Master Bathroom
- Everywhere
initial: Everywhere
icon: mdi:speaker-wireless
###### INPUT NUMBER ------------------------------------------
input_number:
volume_ambientsounds:
name: Volume
icon: mdi:volume-high
min: 0
max: 1
step: 0.05
initial: 0.45
###### SCRIPTS ------------------------------------------
script:
ambientsounds:
alias: Play Ambient Sounds
sequence:
- service: media_player.volume_set
data_template:
entity_id: >
{% if is_state("input_select.google_home", "Front Room") %} media_player.front_room_hub
{% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.master_bedroom_clock
{% elif is_state("input_select.google_home", "Master Bathroom") %} media_player.great_room
{% elif is_state("input_select.google_home", "Kitchen") %} media_player.kitchen
{% elif is_state("input_select.google_home", "Nursery") %} media_player.nursery_hub
{% elif is_state("input_select.google_home", "Computer Area") %} media_player.computer_area_hub
{% elif is_state("input_select.google_home", "Downstairs") %} media_player.downstairs_public
{% elif is_state("input_select.google_home", "Everywhere") %} media_player.all_speakers
{% endif %}
volume_level: "0.0"
- delay: "00:00:02"
- service: media_player.play_media
data_template:
entity_id: >
{% if is_state("input_select.google_home", "Front Room") %} media_player.front_room_hub
{% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.master_bedroom_clock
{% elif is_state("input_select.google_home", "Master Bathroom") %} media_player.great_room
{% elif is_state("input_select.google_home", "Kitchen") %} media_player.kitchen
{% elif is_state("input_select.google_home", "Nursery") %} media_player.nursery_hub
{% elif is_state("input_select.google_home", "Computer Area") %} media_player.computer_area_hub
{% elif is_state("input_select.google_home", "Downstairs") %} media_player.downstairs_public
{% elif is_state("input_select.google_home", "Everywhere") %} media_player.all_speakers
{% endif %}
media_content_id: >
{% if is_state("input_select.ambient_sound", "Babbling Brook") %} media-source://dlna_dms/dream_media/:22$@12744
{% elif is_state("input_select.ambient_sound", "Female Baby Shusher") %} media-source://dlna_dms/dream_media/:22$@12745
{% elif is_state("input_select.ambient_sound", "Male Baby Shusher") %} media-source://dlna_dms/dream_media/:22$@12736
{% elif is_state("input_select.ambient_sound", "Country Night") %} media-source://dlna_dms/dream_media/:22$@12741
{% elif is_state("input_select.ambient_sound", "Fireplace") %} media-source://dlna_dms/dream_media/:22$@12743
{% elif is_state("input_select.ambient_sound", "Forest") %} media-source://dlna_dms/dream_media/:22$@12731
{% elif is_state("input_select.ambient_sound", "Female Lullaby") %} media-source://dlna_dms/dream_media/:22$@12734
{% elif is_state("input_select.ambient_sound", "Male Lullaby") %} media-source://dlna_dms/dream_media/:22$@12739
{% elif is_state("input_select.ambient_sound", "Ocean") %} media-source://dlna_dms/dream_media/:22$@12747
{% elif is_state("input_select.ambient_sound", "Oscillating Fan") %} media-source://dlna_dms/dream_media/:22$@12746
{% elif is_state("input_select.ambient_sound", "Pink Noise") %} media-source://dlna_dms/dream_media/:22$@12735
{% elif is_state("input_select.ambient_sound", "Rain") %} media-source://dlna_dms/dream_media/:22$@12737
{% elif is_state("input_select.ambient_sound", "River") %} media-source://dlna_dms/dream_media/:22$@12738
{% elif is_state("input_select.ambient_sound", "Female Rock-a-bye Baby") %} media-source://dlna_dms/dream_media/:22$@12748
{% elif is_state("input_select.ambient_sound", "Male Rock-a-bye Baby") %} media-source://dlna_dms/dream_media/:22$@12733
{% elif is_state("input_select.ambient_sound", "Thunderstorm") %} media-source://dlna_dms/dream_media/:22$@12740
{% elif is_state("input_select.ambient_sound", "Female Twinkle Twinkle") %} media-source://dlna_dms/dream_media/:22$@12742
{% elif is_state("input_select.ambient_sound", "Male Twinkle Twinkle") %} media-source://dlna_dms/dream_media/:22$@12730
{% elif is_state("input_select.ambient_sound", "White Noise") %} media-source://dlna_dms/dream_media/:22$@12740
{% elif is_state("input_select.ambient_sound", "Random White Noise") %}
{% set noises = ['media-source://dlna_dms/dream_media/:22$@12744',
'media-source://dlna_dms/dream_media/:22$@12746',
'media-source://dlna_dms/dream_media/:22$@12731',
'media-source://dlna_dms/dream_media/:22$@12747',
'media-source://dlna_dms/dream_media/:22$@12738',
'media-source://dlna_dms/dream_media/:22$@12740'] %}
{{ noises|random }}
{% elif is_state("input_select.ambient_sound", "Random Kids Noise") %}
{% set noises = ['media-source://dlna_dms/dream_media/:22$@12734',
'media-source://dlna_dms/dream_media/:22$@12748',
'media-source://dlna_dms/dream_media/:22$@12742'] %}
{{ noises|random }}
{% endif %}
media_content_type: "audio/mp4"
- delay: "00:00:01"
- service: media_player.volume_set
data_template:
entity_id: >
{% if is_state("input_select.google_home", "Front Room") %} media_player.front_room_hub
{% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.master_bedroom_clock
{% elif is_state("input_select.google_home", "Master Bathroom") %} media_player.great_room
{% elif is_state("input_select.google_home", "Kitchen") %} media_player.kitchen
{% elif is_state("input_select.google_home", "Nursery") %} media_player.nursery_hub
{% elif is_state("input_select.google_home", "Computer Area") %} media_player.computer_area_hub
{% elif is_state("input_select.google_home", "Downstairs") %} media_player.downstairs_public
{% elif is_state("input_select.google_home", "Everywhere") %} media_player.all_speakers
{% endif %}
volume_level: "{{ states.input_number.volume_ambientsounds.state }}"
###############################################################################
# Automations
###############################################################################
automation:
- alias: "Set Radio Volume"
id: automation_set_radio_volume
trigger:
platform: state
entity_id: input_number.volume_ambientsounds
action:
service: media_player.volume_set
data_template:
entity_id: >
{% if is_state("input_select.google_home", "Front Room") %} media_player.front_room_hub
{% elif is_state("input_select.google_home", "Master Bedroom") %} media_player.master_bedroom_clock
{% elif is_state("input_select.google_home", "Master Bathroom") %} media_player.great_room
{% elif is_state("input_select.google_home", "Kitchen") %} media_player.kitchen
{% elif is_state("input_select.google_home", "Nursery") %} media_player.nursery_hub
{% elif is_state("input_select.google_home", "Computer Area") %} media_player.computer_area_hub
{% elif is_state("input_select.google_home", "Downstairs") %} media_player.downstairs_public
{% elif is_state("input_select.google_home", "Everywhere") %} media_player.all_speakers
{% endif %}
volume_level: "{{ states.input_number.volume_ambientsounds.state }}"
+48
View File
@@ -0,0 +1,48 @@
input_boolean:
announcement_pending:
name: Announcement Pending
icon: mdi:bullhorn
announce_washing_machine_done:
name: Announce Washing Machine Done
icon: mdi:washing-machine
announce_dryer_done:
name: Announce Dryer Done
icon: mdi:tumble-dryer
announce_dishwasher_done:
name: Announce Dishwasher Done
icon: mdi:dishwasher
announce_almost_bedtime:
name: Announce Almost Bedtime
icon: mdi:sleep
announce_goodnight_emmett:
name: Announce Goodnight Emmett
icon: mdi:sleep
announce_goodnight_bridget:
name: Announce Goodnight Bridget
icon: mdi:sleep
announce_goodnight_ebin:
name: Announce Goodnight Ebin
icon: mdi:sleep
announce_goodnight_emmett_bridget:
name: Announce Goodnight Emmett Bridget
icon: mdi:sleep
announce_goodnight_emmett_ebin:
name: Announce Goodnight Emmett Ebin
icon: mdi:sleep
announce_goodnight_bridget_ebin:
name: Announce Goodnight Bridget Ebin
icon: mdi:sleep
announce_goodnight_emmett_bridget_ebin:
name: Announce Goodnight Emmett Bridget Ebin
icon: mdi:sleep
@@ -0,0 +1,170 @@
template:
- binary_sensor:
- name: Dishwasher
unique_id: templatebinarysensor.dishwasher
icon: mdi:dishwasher
delay_on: "{{states('input_number.dishwasher_delay_on') | float(default=0) }}"
delay_off: "{{states('input_number.dishwasher_delay_off') | float(default=0) }}"
availability: "{{ states('sensor.pm_dishwasher_w') not in ['unkown', 'unavailable'] }}"
attributes:
model_number: 'MDB6769PAS1'
serial_number: 'F24407234'
power: "{{ states('sensor.pm_dishwasher_w') | float(default=0)}}"
target: "{{ states('input_number.dishwasher_on') | float(default=0)}}"
state: "{{ states('sensor.pm_dishwasher_w')|float(default=0) >= states('input_number.dishwasher_on')|float(default=0) }}"
- sensor:
- name: Dishwasher
unique_id: templatesensor_dishwasher
state: >
{% if is_state('binary_sensor.dishwasher','on')%}
running
{% elif is_state('binary_sensor.dishwasher','off') and is_state('input_boolean.empty_dishwasher','on') %}
pending
{% else %}
idle
{% endif %}
icon: >
{% if is_state('sensor.dishwasher','idle') %}
mdi:dishwasher-off
{% elif is_state('sensor.dishwasher','pending') %}
mdi:dishwasher-alert
{% else %}
mdi:dishwasher
{% endif %}
attributes:
model_number: 'MDB6769PAS1'
serial_number: 'F24407234'
power: "{{ states('sensor.pm_dishwasher_w') | float(default=0)}}"
target: "{{ states('input_number.dishwasher_on') | float(default=0)}}"
input_boolean:
empty_dishwasher:
name: Empty Dishwasher
icon: mdi:cupboard
input_number:
dishwasher_on:
# was 4
name: 'Dishwasher On'
icon: mdi:dishwasher
min: 0
max: 1000
step: 0.1
mode: box
unit_of_measurement: W
dishwasher_off:
name: 'Dishwasher Off'
icon: mdi:dishwasher-off
min: 0
max: 1000
step: 0.1
mode: box
unit_of_measurement: W
dishwasher_delay_on:
name: 'Dishwasher Delay On'
icon: mdi:clock
min: 0
max: 900
step: 10
mode: box
dishwasher_delay_off:
# was 600
name: 'Dishwasher Delay Off'
icon: mdi:clock-alert
min: 0
max: 900
step: 10
mode: box
automation:
- id: automation_empty_dishwasher_state
alias: Empty Dishwasher
trigger:
- id: dishwasher_off
platform: state
entity_id: binary_sensor.dishwasher
from: 'on'
to: 'off'
- id: dishwasher_on
platform: state
entity_id: binary_sensor.dishwasher
from: 'off'
to: 'on'
- id: door_open
platform: state
entity_id: binary_sensor.dishwasher_door_contact
from: 'off'
to: 'on'
for:
seconds: 5
condition: []
action:
- choose:
- alias: "Dishwasher is running. No need to empty it yet"
conditions:
- condition: trigger
id: dishwasher_on
- condition: state
entity_id: input_boolean.empty_dishwasher
state: 'on'
sequence:
- service: logbook.log
data_template:
name: Empty Dishwasher - Load Started
entity_id: automation.empty_dishwasher
message: Dishwasher just turned on. Turning off input_boolean in case it got left on
- service: homeassistant.turn_off
target:
entity_id: input_boolean.empty_dishwasher
- alias: "Dishwasher finished while door was shut"
conditions:
- condition: trigger
id: dishwasher_off
- condition: state
entity_id: binary_sensor.dishwasher_door_contact
state: 'off'
sequence:
- service: logbook.log
data_template:
name: Empty Dishwasher - Load finished
entity_id: automation.empty_dishwasher
message: Dishwasher just turned off while the door was shut. Assuming dishes need to be put away
- service: homeassistant.turn_on
target:
entity_id: input_boolean.empty_dishwasher
- alias: "Door was opened for 30 seconds while dishwasher was off"
conditions:
- condition: trigger
id: door_open
- condition: state
entity_id: binary_sensor.dishwasher
state: 'off'
sequence:
- service: logbook.log
data_template:
name: Empty Dishwasher - Dishes put away
entity_id: automation.empty_dishwasher
message: Dishwasher door was opened while the dishwasher was off. Assuming dishes don't need to be put away.
- service: homeassistant.turn_off
target:
entity_id: input_boolean.empty_dishwasher
mode: single
@@ -0,0 +1,215 @@
template:
- trigger:
- platform: state
entity_id:
- sensor.pm_dryer_w
- input_number.tumble_dryer_delay_on
- input_number.tumble_dryer_delay_off
not_to:
- "unknown"
- "unavailable"
- platform: event
event_type: event_template_reloaded
id: "reload"
- platform: homeassistant
event: start
binary_sensor:
- name: Tumble Dryer
unique_id: binary-sensor-tumble-dryer
delay_on: "{{states('input_number.tumble_dryer_delay_on') | float(default=0)}}"
delay_off: "{{states('input_number.tumble_dryer_delay_off') | float(default=0)}}"
icon: mdi:tumble-dryer
availability: "{{ states('sensor.pm_dryer_w') not in ['unkown', 'unavailable'] }}"
attributes:
model_number: 'DVE45R6100W/A3'
serial_number: '0AY95BBM605793X'
power: "{{ states('sensor.pm_dryer_w') | float(default=0)}}"
target: "{{ states('input_number.tumble_dryer_on') | float(default=0)}}"
state: "{{ states('sensor.pm_dryer_w')|float(default=0) >= states('input_number.tumble_dryer_on')|float(default=0) }}"
- trigger:
- platform: state
entity_id: sensor.pm_dryer_w
not_to:
- "unknown"
- "unavailable"
- platform: state
entity_id: input_number.tumble_dryer_delay_on
not_to:
- "unknown"
- "unavailable"
- platform: state
entity_id: input_number.tumble_dryer_delay_off
not_to:
- "unknown"
- "unavailable"
- platform: event
event_type: event_template_reloaded
id: "reload"
- platform: homeassistant
event: start
sensor:
- name: Tumble Dryer
unique_id: templatesensor_tumble_dryer
state: >
{% if is_state('binary_sensor.tumble_dryer','on') %}
running
{% elif is_state('binary_sensor.tumble_dryer','off') and is_state('input_boolean.fold_clothes','on') %}
pending
{% else %}
idle
{% endif %}
icon: >
{% if is_state('sensor.tumble_dryer','idle') %}
mdi:tumble-dryer-off
{% elif is_state('sensor.tumble_dryer','pending') %}
mdi:tumble-dryer-alert
{% else %}
mdi:tumble-dryer
{% endif %}
attributes:
model_number: 'DVE45R6100W/A3'
serial_number: '0AY95BBM605793X'
power: "{{ states('sensor.pm_dryer_w') | float(default=0)}}"
target: "{{ states('input_number.tumble_dryer_on') | float(default=0)}}"
input_boolean:
fold_clothes:
name: Fold Clothes
icon: mdi:hanger
input_number:
tumble_dryer_on:
# was 10
name: 'Tumble Dryer On'
icon: mdi:tumble-dryer
min: 0
max: 1000
step: 0.1
mode: box
unit_of_measurement: W
tumble_dryer_off:
name: 'Tumble Dryer Off'
icon: mdi:tumble-dryer-off
min: 0
max: 1000
step: 0.1
mode: box
unit_of_measurement: W
tumble_dryer_delay_on:
name: 'Tumble Dryer Delay On'
icon: mdi:clock
min: 0
max: 900
step: 10
mode: box
tumble_dryer_delay_off:
# was 10
name: 'Tumble Dryer Delay Off'
icon: mdi:clock-alert
min: 0
max: 900
step: 10
mode: box
automation:
- id: automation_fold_clothes_state
alias: Fold Clothes
trigger:
- id: tumble_dryer_off
platform: state
entity_id: binary_sensor.tumble_dryer
from: 'on'
to: 'off'
- id: tumble_dryer_on
platform: state
entity_id: binary_sensor.tumble_dryer
from: 'off'
to: 'on'
- id: door_open
platform: state
entity_id: binary_sensor.tumble_dryer_door_contact
from: 'off'
to: 'on'
for:
seconds: 5
condition: []
action:
- choose:
- alias: "Dryer is running. No need to fold clothes yet"
conditions:
- condition: trigger
id: tumble_dryer_on
- condition: state
entity_id: input_boolean.fold_clothes
state: 'on'
sequence:
- service: logbook.log
data_template:
name: Fold Clothes - Load started
entity_id: automation.fold_clothes
message: Dryer turned on. No need to fold clothes yet. Turning off input_boolean in case it got left on
- service: homeassistant.turn_off
target:
entity_id: input_boolean.fold_clothes
- alias: "Dryer finished while door was shut"
conditions:
- condition: trigger
id: tumble_dryer_off
- condition: state
entity_id: binary_sensor.tumble_dryer_door_contact
state: 'off'
sequence:
- service: logbook.log
data_template:
name: Fold Clothes - Load finished
entity_id: automation.fold_clothes
message: Dryer just turned off. Assuming clothes need to be folded
- service: homeassistant.turn_on
target:
entity_id: input_boolean.fold_clothes
- alias: "Door was opened while dryer was off"
conditions:
- condition: trigger
id: door_open
- condition: state
entity_id: binary_sensor.tumble_dryer
state: 'off'
- condition: state
entity_id: input_boolean.fold_clothes
state: 'on'
sequence:
- service: logbook.log
data_template:
name: Fold Clothes - Clothes folded
entity_id: automation.fold_clothes
message: Door was opened while dryer was off. Assuming clothes are now folded
- service: homeassistant.turn_off
target:
entity_id: input_boolean.fold_clothes
mode: single
@@ -0,0 +1,172 @@
template:
- binary_sensor:
- name: Washing Machine
unique_id: templatebinarysensor.washing_machine
delay_on: "{{states('input_number.washing_machine_delay_on') | float(default=0)}}"
delay_off: "{{states('input_number.washing_machine_delay_off') | float(default=0)}}"
icon: mdi:washing-machine
availability: "{{ states('sensor.pm_laundry_plug_w') not in ['unkown', 'unavailable'] }}"
attributes:
model_number: 'WF45R6100AW/US'
serial_number: '01FY57AM802740X'
power: "{{ states('sensor.pm_laundry_plug_w') | float(default=0)}}"
target: "{{ states('input_number.washing_machine_on') | float(default=0)}}"
state: "{{ states('sensor.pm_laundry_plug_w')|float(default=0) >= states('input_number.washing_machine_on')|float(default=0) }}"
- sensor:
- name: Washing Machine
unique_id: templatesensor_washing_machine
state: >
{% if is_state('binary_sensor.washing_machine','on') %}
running
{% elif is_state('binary_sensor.washing_machine','off') and is_state('input_boolean.swap_laundry','on') %}
pending
{% else %}
idle
{% endif %}
icon: >
{% if is_state('sensor.washing_machine','idle') %}
mdi:washing-machine-off
{% elif is_state('sensor.washing_machine','pending') %}
mdi:washing-machine-alert
{% else %}
mdi:washing-machine
{% endif %}
attributes:
model_number: 'WF45R6100AW/US'
serial_number: '01FY57AM802740X'
power: "{{ states('sensor.pm_laundry_plug_w') | float(default=0)}}"
target: "{{ states('input_number.washing_machine_on') | float(default=0)}}"
input_boolean:
swap_laundry:
name: Swap Laundry
icon: mdi:tshirt-crew
input_number:
washing_machine_on:
# was 5
name: 'Washing Machine On'
icon: mdi:washing-machine
min: 0
max: 20
step: 0.1
mode: box
unit_of_measurement: W
washing_machine_off:
name: 'Washing Machine Off'
icon: mdi:washing-machine-off
min: 0
max: 20
step: 0.1
mode: box
unit_of_measurement: W
washing_machine_delay_on:
name: 'Washing Machine Delay On'
icon: mdi:clock
min: 0
max: 900
step: 10
mode: box
washing_machine_delay_off:
# was 10
name: 'Washing Machine Delay Off'
icon: mdi:clock-alert
min: 0
max: 900
step: 10
mode: box
automation:
- id: automation_swap_laundry_state
alias: Swap Laundry
trigger:
- id: washing_machine_off
platform: state
entity_id: binary_sensor.washing_machine
from: 'on'
to: 'off'
- id: washing_machine_on
platform: state
entity_id: binary_sensor.washing_machine
from: 'off'
to: 'on'
- id: door_open
platform: state
entity_id: binary_sensor.washing_machine_door_contact
from: 'off'
to: 'on'
for:
seconds: 5
condition: []
action:
- choose:
- alias: "Washing machine is running. No need to swap laundry yet"
conditions:
- condition: trigger
id: washing_machine_on
- condition: state
entity_id: input_boolean.swap_laundry
state: 'on'
sequence:
- service: logbook.log
data_template:
name: Swap Laundry - Load started
entity_id: automation.swap_laundry
message: Washing machine is running. No need to swap laundry yet. Turning off input_boolean.swap_laundry, in case it was left on
- service: homeassistant.turn_off
target:
entity_id: input_boolean.swap_laundry
- alias: "Washing machine finished while door was shut"
conditions:
- condition: trigger
id: washing_machine_off
- condition: state
entity_id: binary_sensor.washing_machine_door_contact
state: 'off'
sequence:
- service: logbook.log
data_template:
name: Swap Laundry - Load needs to be swapped
entity_id: automation.swap_laundry
message: Washing machine turned off while the door was shut. Assuming that a load needs to be swapped
- service: homeassistant.turn_on
target:
entity_id: input_boolean.swap_laundry
- alias: "Door was opened while washing machine was off"
conditions:
- condition: trigger
id: door_open
- condition: state
entity_id: binary_sensor.washing_machine
state: 'off'
- condition: state
entity_id: input_boolean.swap_laundry
state: 'on'
sequence:
- service: logbook.log
data_template:
name: Swap Laundry - Load swapped
entity_id: automation.swap_laundry
message: Door was opened while washing machine was off. Assuming a load just got swapped
- service: homeassistant.turn_off
target:
entity_id: input_boolean.swap_laundry
mode: single
@@ -0,0 +1,778 @@
input_boolean:
sprinkler_is_winterized:
name: "Sprinkler: Is Winterized"
icon: mdi:sprinkler
log_precipitation:
name: "Log Precipitation"
icon: mdi:file
log_soil_moisture:
name: "Log Soil Moisture"
icon: mdi:file
input_datetime:
sprinkler_last_reset:
name: "Sprinkler: Last Reset"
icon: mdi:calendar
has_date: true
has_time: false
sprinkler_last_run:
name: "Sprinkler: Last Run"
icon: mdi:calendar
has_date: true
has_time: false
sprinkler_next_dawn:
name: "Sprinkler: Next Dawn"
icon: mdi:weather-sunset-up
has_date: true
has_time: true
input_number:
sprinkler_days_before_high_run:
name: "Sprinkler: Days Before High Run"
icon: mdi:calendar
min: 0
max: 10
step: 1
mode: box
sprinkler_days_before_medium_run:
name: "Sprinkler: Days Before Medium Run"
icon: mdi:calendar
min: 0
max: 10
step: 1
mode: box
sprinkler_days_before_low_run:
name: "Sprinkler: Days Before Low Run"
icon: mdi:calendar
min: 0
max: 10
step: 1
mode: box
sprinkler_days_before_reset:
name: "Sprinkler: Days Before Reset"
icon: mdi:calendar
min: 0
max: 20
step: 1
mode: box
sprinkler_precipitation_below_high_run:
name: "Sprinkler: Precipitation Below - High Run"
icon: mdi:water
min: 0
max: 50
step: 0.1
unit_of_measurement: mm
mode: box
sprinkler_precipitation_below_medium_run:
name: "Sprinkler: Precipitation Below - Medium Run"
icon: mdi:water
min: 0
max: 50
step: 0.1
unit_of_measurement: mm
mode: box
sprinkler_precipitation_below_low_run:
name: "Sprinkler: Precipitation Below - Low Run"
icon: mdi:water
min: 0
max: 50
step: 0.1
unit_of_measurement: mm
mode: box
sprinkler_temp_above_high_run:
name: "Sprinkler: Temp Above - High Run"
icon: mdi:thermometer-high
min: 50
max: 90
step: 1
unit_of_measurement: °F
sprinkler_temp_above_medium_run:
name: "Sprinkler: Temp Above - Medium Run"
icon: mdi:thermometer
min: 50
max: 90
step: 1
unit_of_measurement: °F
sprinkler_temp_above_low_run:
name: "Sprinkler: Temp Above - Low Run"
icon: mdi:thermometer-low
min: 50
max: 90
step: 1
unit_of_measurement: °F
sprinkler_maximum_temperature_measured:
name: "Sprinkler: Maximum Temperature Measured"
icon: mdi:thermometer
min: -20
max: 150
step: 0.01
unit_of_measurement: °F
mode: box
sprinkler_repeat_program_amount:
name: "Sprinkler: Repeat Program Amount"
icon: mdi:pound
min: 0
max: 10
step: 1
sprinkler_high_water_level:
name: "Sprinkler: High Water Level"
icon: mdi:water-plus
min: 0
max: 300
step: 1
mode: box
sprinkler_medium_water_level:
name: "Sprinkler: Medium Water Level"
icon: mdi:water
min: 0
max: 300
step: 1
mode: box
sprinkler_low_water_level:
name: "Sprinkler: Low Water Level"
icon: mdi:water-minus
min: 0
max: 300
step: 1
mode: box
template:
- trigger:
- platform: state
entity_id:
- input_number.sprinkler_maximum_temperature_measured
- sensor.sprinkler_total_rain_fallen_plus_expected
- sensor.sprinkler_days_since_last_watering
- input_number.sprinkler_temp_above_high_run
- input_number.sprinkler_temp_above_medium_run
- input_number.sprinkler_temp_above_low_run
- input_number.sprinkler_precipitation_below_high_run
- input_number.sprinkler_precipitation_below_medium_run
- input_number.sprinkler_precipitation_below_low_run
- input_number.sprinkler_days_before_high_run
- input_number.sprinkler_days_before_medium_run
- input_number.sprinkler_days_before_low_run
- switch.opensprinkler_enabled
not_to: "unavailable"
- platform: event
event_type: event_template_reloaded
id: "reload"
- platform: homeassistant
event: start
sensor:
- name: "Sprinkler: Current Status"
unique_id: "custom_sensor.sprinkler_current_status"
icon: mdi:sprinkler-variant
state: >
{%- if is_state('input_boolean.sprinkler_is_winterized','on') %}
Sprinkler is winterized
{%- else %}
{%- if is_state('switch.opensprinkler_enabled','on') %}
{%- if states('input_number.sprinkler_maximum_temperature_measured') | int(default=0) > states('input_number.sprinkler_temp_above_low_run') | int(default=0) %}
{%- if states('input_number.sprinkler_maximum_temperature_measured') | int(default=0) > states('input_number.sprinkler_temp_above_medium_run') | int(default=0) %}
{%- if states('input_number.sprinkler_maximum_temperature_measured') | int(default=0) > states('input_number.sprinkler_temp_above_high_run') | int(default=0) %}
{%- if states('sensor.sprinkler_total_rain_fallen_plus_expected') | float(default=0) < states('input_number.sprinkler_precipitation_below_high_run') | float(default=0.0) -%}
{%- if states('sensor.sprinkler_days_since_last_watering') | float(default=0) > states('input_number.sprinkler_days_before_high_run') | float(default=10.0) -%}
High
{%- else %}
Too Soon
{% endif %}
{%- else %}
Too Wet
{% endif %}
{%- else %}
{%- if states('sensor.sprinkler_total_rain_fallen_plus_expected') | float(default=0) < states('input_number.sprinkler_precipitation_below_medium_run') | float(default=0.0) %}
{%- if states('sensor.sprinkler_days_since_last_watering') | float(default=0) > states('input_number.sprinkler_days_before_medium_run') | float(default=10.0) %}
Medium
{%- else %}
Too Soon
{% endif %}
{%- else %}
Too Wet
{%- endif %}
{% endif %}
{%- else %}
{%- if states('sensor.sprinkler_total_rain_fallen_plus_expected') | float(default=0) < states('input_number.sprinkler_precipitation_below_low_run') | float(default=0.0) %}
{%- if states('sensor.sprinkler_days_since_last_watering') | float(default=0) > states('input_number.sprinkler_days_before_low_run') | float(default=10.0) %}
Low
{%- else %}
Too Soon
{% endif %}
{%- else %}
Too Wet
{% endif %}
{% endif %}
{%- else %}
Too Cold
{% endif %}
{%- else %}
Off
{% endif %}
{% endif %}
- trigger:
- platform: state
entity_id: sensor.sprinkler_recent_rain_precipitation
- platform: event
event_type: event_template_reloaded
id: "reload"
- platform: homeassistant
event: start
sensor:
- name: "Sprinkler: Total Rain Fallen Plus Expected"
unique_id: "custom_sensor.sprinkler_total_rain_fallen_plus_expected"
icon: mdi:weather-pouring
unit_of_measurement: mm
availability: "{{ states('sensor.sprinkler_recent_rain_precipitation') not in ['unkown', 'unavailable'] }}"
state: >
{{ (states('sensor.sprinkler_recent_rain_precipitation') | float + states('sensor.sprinkler_total_expected_precipitation') | float(default=100.0) ) | round(2) }}
- trigger:
- platform: state
entity_id: sensor.sun_next_rising
- platform: event
event_type: event_template_reloaded
id: "reload"
- platform: homeassistant
event: start
sensor:
- name: "Sprinkler: One Hour Before Sunrise"
unique_id: "custom_sensor.sprinkler_one_hour_before_sunrise"
icon: mdi:clock
device_class: timestamp
state: >
{{ (( as_timestamp(states('sensor.sun_next_rising')) - 3600) | timestamp_utc) }}
- trigger:
- platform: state
entity_id:
- sensor.opensprinkler_water_level
- input_number.front_yard_station_minutes
- input_number.east_side_station_minutes
- input_number.back_yard_station_minutes
- input_number.west_side_station_minutes
- input_number.sprinkler_repeat_program_amount
- platform: event
event_type: event_template_reloaded
id: "reload"
- platform: homeassistant
event: start
sensor:
- name: "Sprinkler: Expected Run Length"
unique_id: "custom_sensor.sprinkler_expected_run_length"
icon: mdi:clock
unit_of_measurement: seconds
availability: >
{{ states('sensor.opensprinkler_water_level') not in ['unkown', 'unavailable'] and
states('input_number.front_yard_station_minutes') not in ['unkown', 'unavailable'] and
states('input_number.east_side_station_minutes') not in ['unkown', 'unavailable'] and
states('input_number.back_yard_station_minutes') not in ['unkown', 'unavailable'] and
states('input_number.west_side_station_minutes') not in ['unkown', 'unavailable'] and
states('input_number.sprinkler_repeat_program_amount') not in ['unkown', 'unavailable'] }}
state: >
{{ states("sensor.opensprinkler_water_level")| float(default=0) | multiply(0.01) | multiply(states("input_number.front_yard_station_minutes") | multiply(60)) | float(default=0) +
states("sensor.opensprinkler_water_level")| float(default=0) | multiply(0.01) | multiply(states("input_number.east_side_station_minutes") | multiply(60)) | float(default=0) +
states("sensor.opensprinkler_water_level")| float(default=0) | multiply(0.01) | multiply(states("input_number.back_yard_station_minutes") | multiply(60)) | float(default=0) +
states("sensor.opensprinkler_water_level")| float(default=0) | multiply(0.01) | multiply(states("input_number.west_side_station_minutes") | multiply(60)) | float(default=0) *
states("input_number.sprinkler_repeat_program_amount") | float(default=0) }}
attributes:
front_yard: "{{ states('sensor.opensprinkler_water_level')| float(default=0) | multiply(0.01) | multiply(states('input_number.front_yard_station_minutes') | multiply(60)) | float(default=0) }} seconds"
east_side: "{{ states('sensor.opensprinkler_water_level')| float(default=0) | multiply(0.01) | multiply(states('input_number.east_side_station_minutes') | multiply(60)) | float(default=0) }} seconds"
back_yard: "{{ states('sensor.opensprinkler_water_level')| float(default=0) | multiply(0.01) | multiply(states('input_number.back_yard_station_minutes') | multiply(60)) | float(default=0) }} seconds"
west_side: "{{ states('sensor.opensprinkler_water_level')| float(default=0) | multiply(0.01) | multiply(states('input_number.west_side_station_minutes') | multiply(60)) | float(default=0) }} seconds"
water_level: "{{ states('sensor.opensprinkler_water_level') | float(default=0) }}%"
run_cycle: "{{ states('input_number.sprinkler_repeat_program_amount') | float(default=0) }} time(s)"
- trigger:
- platform: time_pattern
minutes: "/5"
- platform: state
entity_id: input_datetime.sprinkler_last_reset
- platform: state
entity_id: input_datetime.sprinkler_next_dawn
- platform: event
event_type: event_template_reloaded
id: "reload"
- platform: homeassistant
event: start
sensor:
- name: "Sprinkler: Days Since Last Watering"
unique_id: "custom_sensor.sprinkler_days_since_last_watering"
icon: mdi:calendar
state: >
{{ ((as_timestamp(states('sensor.sprinkler_one_hour_before_sunrise')) - as_timestamp(states('input_datetime.sprinkler_last_reset'))) / 86400 | float) | round(2) }}
# This really isn't needed. It just checks the trend binary_sensor.is_raining, and keeps it 'on' an extra 15 minutes
- trigger:
- platform: state
entity_id: binary_sensor.is_raining
not_from:
- "unknown"
- "unavailable"
binary_sensor:
- name: "Sprinkler: Raining"
unique_id: "custom_binary_sensor.sprinkler_raining"
device_class: moisture
delay_off:
minutes: 15
# availability: "{{ states('sensor.rain_quarter_hourly_precipitation') not in ['unkown', 'unavailable'] }}"
# state: >
# {{ states('sensor.rain_quarter_hourly_precipitation') | float(default=0) > 0.0 }}
availability: "{{ states('binary_sensor.is_raining') not in ['unkown', 'unavailable'] }}"
state: >
{{ states('binary_sensor.is_raining') }}
- trigger:
# - platform: homeassistant
# event: start
# - platform: time
# at: '01:00:00'
# - platform: state
# entity_id: input_boolean.sprinkler_is_winterized
binary_sensor:
- name: "Sprinkler: In Season"
unique_id: "custom_binary_sensor.sprinkler_in_season"
device_class: moisture
state: "{{ now().month > 4 and now().month < 10 }}"
# - trigger:
# - platform: homeassistant
# event: start
# - platform: time
# at: '01:00:00'
# - platform: state
# entity_id: input_boolean.sprinkler_is_winterized
# - platform: event
# event_type: event_template_reloaded
# id: "reload"
# binary_sensor:
# - name: "Sprinkler: Should Winterize"
# unique_id: "custom_binary_sensor.sprinkler_should_winterize"
# device_class: problem
# state: "{{ iif(is_state('binary_sensor.sprinkler_in_season', 'off'), iif(is_state('input_boolean.sprinkler_is_winterized', 'off'), 'on', 'off'), 'off') }}"
# - trigger:
# - platform: homeassistant
# event: start
# - platform: time
# at: '01:00:00'
# - platform: state
# entity_id: input_boolean.sprinkler_is_winterized
# - platform: event
# event_type: event_template_reloaded
# id: "reload"
# binary_sensor:
# - name: "Sprinkler: Should Dewinterize"
# unique_id: "custom_binary_sensor.sprinkler_should_dewinterize"
# device_class: problem
# state: "{{ iif(is_state('binary_sensor.sprinkler_in_season', 'on'), iif(is_state('input_boolean.sprinkler_is_winterized', 'on'), 'on', 'off'), 'off') }}"
automation:
- alias: "Log Precipitation"
id: 1f133cd1-7e69-4eb9-ba5f-7fa967dd869d
trigger:
- platform: state
entity_id: input_boolean.log_precipitation
from: "off"
to: "on"
- platform: state
entity_id: sensor.ecowitt_wh40_21917_precipitation
not_to:
- "unknown"
- "unavailable"
- platform: state
entity_id: binary_sensor.is_raining
condition:
- condition: state
entity_id: input_boolean.log_precipitation
state: "on"
action:
- service: notify.precipitation
data:
message: "{{now().strftime('%Y-%m-%d')}}T{{now().strftime('%H:%M:%S.%f')}},{{states('sensor.ecowitt_wh40_21917_precipitation')}},{{states('binary_sensor.is_raining')}},{{state_attr('binary_sensor.is_raining','sample_count')}},{{state_attr('binary_sensor.is_raining','sample_duration')}},{{state_attr('binary_sensor.is_raining','min_gradient')}},{{state_attr('binary_sensor.is_raining','gradient')}}"
- alias: "Log Soil Moisture"
id: 362fbc8d-64f1-47dd-a686-e460e9c18690
trigger:
- platform: state
entity_id: input_boolean.log_soil_moisture
from: "off"
to: "on"
- platform: state
entity_id: sensor.fineoffset_wh51_00f935_moisture
not_to:
- "unknown"
- "unavailable"
- platform: state
entity_id: sensor.fineoffset_wh51_0ce593_moisture
not_to:
- "unknown"
- "unavailable"
- platform: state
entity_id: sensor.fineoffset_wh51_0d1e11_moisture
not_to:
- "unknown"
- "unavailable"
condition:
- condition: state
entity_id: input_boolean.log_soil_moisture
state: "on"
action:
- service: notify.soil_moisture
data:
message: "{{now().strftime('%Y-%m-%d')}}T{{now().strftime('%H:%M:%S.%f')}},{{states('sensor.fineoffset_wh51_00f935_moisture')}},{{states('sensor.fineoffset_wh51_0ce593_moisture')}},{{states('sensor.fineoffset_wh51_0d1e11_moisture')}}"
- alias: "Sprinkler: Reset After Automatic Run"
id: automation_sprinkler_reset_after_automatic_run
trigger:
- platform: state
entity_id: binary_sensor.automatic_run_program_running
from: "on"
to: "off"
action:
- service: script.sprinkler_reset_helper_values
- service: input_datetime.set_datetime
target:
entity_id: input_datetime.sprinkler_last_run
data:
timestamp: "{{ as_timestamp(now()) }}"
- alias: "Sprinkler: Update Next Dawn"
id: automation_sprinkler_update_next_dawn
trigger:
- platform: state
entity_id: sensor.sun_next_dawn
condition: "{{ states('sensor.sun_next_dawn') not in ['unkown', 'unavailable'] }}"
action:
- service: input_datetime.set_datetime
target:
entity_id: input_datetime.sprinkler_next_dawn
data:
timestamp: "{{ as_timestamp(states('sensor.sun_next_dawn')) }}"
- alias: "Sprinkler: Check Maximum Temperature When Temperature Changes"
id: automation_sprinkler_check_maximum_temperature_when_temperature_changes
trigger:
- platform: state
entity_id: sensor.outdoors_mean_temperature
condition:
- condition: numeric_state
entity_id: sensor.outdoors_mean_temperature
above: input_number.sprinkler_maximum_temperature_measured
action:
service: input_number.set_value
target:
entity_id: input_number.sprinkler_maximum_temperature_measured
data:
value: "{{ states('sensor.outdoors_mean_temperature') | float(default=50) }}"
- alias: "Sprinkler: Stop Watering If Starts Raining"
id: 74ef91ed-6665-4e24-a817-c1a3540d2e3d
trigger:
- platform: state
entity_id: binary_sensor.is_raining
to: 'on'
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.back_yard_station_running
state: "on"
- condition: state
entity_id: binary_sensor.front_yard_station_running
state: "on"
- condition: state
entity_id: binary_sensor.east_side_station_running
state: "on"
- condition: state
entity_id: binary_sensor.west_side_station_running
state: "on"
- condition: state
entity_id: binary_sensor.s05_station_running
state: "on"
- condition: state
entity_id: binary_sensor.s06_station_running
state: "on"
- condition: state
entity_id: binary_sensor.s07_station_running
state: "on"
- condition: state
entity_id: binary_sensor.master_station_running
state: "on"
action:
service: opensprinkler.stop
data:
entity_id: switch.opensprinkler_enabled
- alias: "Sprinkler: Check If Yard Needs to Be Watered"
id: automation_sprinkler_check_if_yard_needs_to_be_watered
description: "If OpenSprinkler is enabled and the sprinkler system is not winterized, then check if the grass should be watered"
mode: queued
trigger:
- platform: sun
event: sunrise
offset: "-01:15:00"
- platform: state
entity_id: sensor.sprinkler_total_rain_fallen_plus_expected
- platform: state
entity_id: input_number.sprinkler_maximum_temperature_measured
- platform: state
entity_id: sensor.sprinkler_days_since_last_watering
- platform: state
entity_id: input_number.sprinkler_temp_above_high_run
- platform: state
entity_id: input_number.sprinkler_temp_above_medium_run
- platform: state
entity_id: input_number.sprinkler_temp_above_low_run
condition:
- condition: state
entity_id: switch.opensprinkler_enabled
state: "on"
- condition: state
entity_id: input_boolean.sprinkler_is_winterized
state: "off"
action:
- choose:
# Check for High run
- conditions:
- condition: numeric_state
entity_id: input_number.sprinkler_maximum_temperature_measured
above: input_number.sprinkler_temp_above_high_run
- condition: numeric_state
entity_id: sensor.sprinkler_days_since_last_watering
above: input_number.sprinkler_days_before_high_run #0
- condition: numeric_state
entity_id: sensor.sprinkler_total_rain_fallen_plus_expected
below: input_number.sprinkler_precipitation_below_high_run #20.1
sequence:
- service: input_number.set_value
target:
entity_id: input_number.sprinkler_repeat_program_amount
data:
value: 1
- service: opensprinkler.set_water_level
data:
entity_id: sensor.opensprinkler_water_level
water_level: "{{ states('input_number.sprinkler_high_water_level') | int }}"
# Check for Medium run
- conditions:
- condition: numeric_state
entity_id: sensor.sprinkler_days_since_last_watering
above: input_number.sprinkler_days_before_medium_run #2
- condition: numeric_state
entity_id: input_number.sprinkler_maximum_temperature_measured
above: input_number.sprinkler_temp_above_medium_run
below: input_number.sprinkler_temp_above_high_run
- condition: numeric_state
entity_id: sensor.sprinkler_total_rain_fallen_plus_expected
below: input_number.sprinkler_precipitation_below_medium_run #15.1
sequence:
- service: input_number.set_value
target:
entity_id: input_number.sprinkler_repeat_program_amount
data:
value: 1
- service: opensprinkler.set_water_level
data:
entity_id: sensor.opensprinkler_water_level
water_level: "{{ states('input_number.sprinkler_medium_water_level') | int }}"
# Check for Low run
- conditions:
- condition: numeric_state
entity_id: sensor.sprinkler_days_since_last_watering
above: input_number.sprinkler_days_before_low_run #3
- condition: numeric_state
entity_id: input_number.sprinkler_maximum_temperature_measured
above: input_number.sprinkler_temp_above_low_run
below: input_number.sprinkler_temp_above_medium_run
- condition: numeric_state
entity_id: sensor.sprinkler_total_rain_fallen_plus_expected
below: input_number.sprinkler_precipitation_below_low_run #10.1
sequence:
- service: input_number.set_value
target:
entity_id: input_number.sprinkler_repeat_program_amount
data:
value: 1
- service: opensprinkler.set_water_level
data:
entity_id: sensor.opensprinkler_water_level
water_level: "{{ states('input_number.sprinkler_low_water_level') | int }}"
# Check for reset
- conditions:
- condition: numeric_state
entity_id: sensor.sprinkler_days_since_last_watering
above: input_number.sprinkler_days_before_reset #4
sequence:
- service: script.sprinkler_reset_helper_values
data: {}
default:
- service: input_number.set_value
target:
entity_id: input_number.sprinkler_repeat_program_amount
data:
value: 0
- service: opensprinkler.set_water_level
data:
entity_id: sensor.opensprinkler_water_level
water_level: 0
script:
sprinkler_reset_helper_values:
alias: "Sprinkler: Reset Helper Values"
icon: mdi:refresh
sequence:
- service: input_number.set_value
target:
entity_id: input_number.sprinkler_maximum_temperature_measured
data:
value: "{{ states('sensor.outdoors_mean_temperature') | float(default=50) }}"
- service: input_datetime.set_datetime
target:
entity_id: input_datetime.sprinkler_last_reset
data:
timestamp: "{{ as_timestamp(now()) }}"
- service: utility_meter.reset
data: {}
target:
entity_id: select.sprinkler_recent_rain
sprinkler_start_scripted_watering:
alias: "Sprinkler: Start Scripted Watering"
icon: mdi:sprinkler-variant
sequence:
- alias: "Run the sprinkler program the appropriate number of times"
repeat:
count: "{{states('input_number.sprinkler_repeat_program_amount') | int }}"
sequence:
- service: opensprinkler.run
data:
entity_id: switch.opensprinkler_enabled
run_seconds:
- '{{ states("sensor.opensprinkler_water_level") | multiply(0.01) | multiply(states("input_number.front_yard_station_minutes") | multiply(60)) | int }}'
- '{{ states("sensor.opensprinkler_water_level") | multiply(0.01) | multiply(states("input_number.east_side_station_minutes") | multiply(60)) | int }}'
- '{{ states("sensor.opensprinkler_water_level") | multiply(0.01) | multiply(states("input_number.back_yard_station_minutes") | multiply(60)) | int }}'
- '{{ states("sensor.opensprinkler_water_level") | multiply(0.01) | multiply(states("input_number.west_side_station_minutes") | multiply(60)) | int }}'
- delay: '{{ states("sensor.opensprinkler_water_level") | multiply(0.01) | multiply(states("input_number.front_yard_station_minutes") | multiply(60)) | int }}'
- delay: '{{ states("sensor.opensprinkler_water_level") | multiply(0.01) | multiply(states("input_number.east_side_station_minutes") | multiply(60)) | int }}'
- delay: '{{ states("sensor.opensprinkler_water_level") | multiply(0.01) | multiply(states("input_number.back_yard_station_minutes") | multiply(60)) | int }}'
- delay: '{{ states("sensor.opensprinkler_water_level") | multiply(0.01) | multiply(states("input_number.west_side_station_minutes") | multiply(60)) | int }}'
utility_meter:
rain_quarter_hourly:
unique_id: utility_meter_rain_quarter_hourly
name: "Rain: Quarter Hourly"
source: sensor.ecowitt_wh40_21917_precipitation
cycle: quarter-hourly
tariffs:
- Precipitation
rain_hourly:
unique_id: utility_meter_rain_hourly
name: "Rain: Hourly"
source: sensor.ecowitt_wh40_21917_precipitation
cycle: hourly
tariffs:
- Precipitation
rain_daily:
unique_id: utility_meter_rain_daily
name: "Rain: Daily"
source: sensor.ecowitt_wh40_21917_precipitation
cycle: daily
offset: "12:00"
tariffs:
- Precipitation
rain_monthly:
unique_id: utility_meter_rain_monthly
name: "Rain: Monthly"
source: sensor.ecowitt_wh40_21917_precipitation
cycle: monthly
tariffs:
- Precipitation
rain_yearly:
unique_id: utility_meter_rain_yearly
name: "Rain: Yearly"
source: sensor.ecowitt_wh40_21917_precipitation
cycle: yearly
tariffs:
- Precipitation
sprinkler_recent_rain:
unique_id: utility_meter_sprinkler_recent_rain
name: "Sprinkler: Recent Rain"
source: sensor.ecowitt_wh40_21917_precipitation
cycle: yearly
tariffs:
- Precipitation
+2
View File
@@ -0,0 +1,2 @@
# Import default automations file
automation: !include ../../automations.yaml
@@ -0,0 +1,2 @@
# Import nested automations
automation nested: !include_dir_list ../../automations
+68
View File
@@ -0,0 +1,68 @@
binary_sensor:
- name: 'Bayesian Crunching'
platform: 'bayesian'
prior: 0.25
probability_threshold: 0.7
observations:
- entity_id: 'input_boolean.bayesian_test_1' # Motion
prob_given_true: 0.99
prob_given_false: 0.85
platform: 'state'
to_state: 'on'
- entity_id: 'input_boolean.bayesian_test_2' # Person
prob_given_true: 0.99
prob_given_false: 0.85
platform: 'state'
to_state: 'on'
- entity_id: 'input_boolean.bayesian_test_3' # Home Occupied
prob_given_true: 0.99
prob_given_false: 0.01
platform: 'state'
to_state: 'on'
# - entity_id: 'input_boolean.bayesian_test_4' # person occupancy
# prob_given_true: 0.99
# prob_given_false: 0.97
# platform: 'state'
# to_state: 'on'
# - entity_id: 'input_boolean.bayesian_test_5' # dreambox recently active
# prob_given_true: 0.75
# prob_given_false: 0.5
# platform: 'state'
# to_state: 'on'
input_boolean:
bayesian_test_1:
name: Bayesian Test 1
icon: mdi:numeric-1-circle
bayesian_test_2:
name: Bayesian Test 2
icon: mdi:numeric-2-circle
bayesian_test_3:
name: Bayesian Test 3
icon: mdi:numeric-3-circle
bayesian_test_4:
name: Bayesian Test 4
icon: mdi:numeric-4-circle
bayesian_test_5:
name: Bayesian Test 5
icon: mdi:numeric-5-circle
bayesian_test_6:
name: Bayesian Test 6
icon: mdi:numeric-6-circle
bayesian_test_7:
name: Bayesian Test 7
icon: mdi:numeric-7-circle
bayesian_test_8:
name: Bayesian Test 8
icon: mdi:numeric-8-circle
+107
View File
@@ -0,0 +1,107 @@
input_select:
camera_dropdown:
name: Cast Camera
options:
- Blue Room
- Kitchen
- Front Room
- Computer Area
- Garage
- Nursery
- Back Yard
- Front Yard
- Front Door
- Master Bedroom
initial: Nursery
icon: mdi:camera
cast_to_screen_dropdown:
name: To Screen
options:
- Front Room Display
- Nursery Hub
- Computer Area Hub
script:
execute_cast_dropdown:
alias: Press to execute
sequence:
# - service: media_player.play_media
# target:
# entity_id: >
# {% if is_state('input_select.cast_to_screen_dropdown', 'Front Room Display') %}
# media_player.front_room_hub
# {% elif is_state('input_select.cast_to_screen_dropdown', 'Nursery Hub') %}
# media_player.nursery_hub
# {% elif is_state('input_select.cast_to_screen_dropdown', 'Computer Area Hub') %}
# media_player.computer_area_hub
# {% endif %}
# data:
# media_content_id: >
# {% if is_state('input_select.camera_dropdown', 'Blue Room') %}
# media-source://camera/camera.frigate_cam01
# {% elif is_state('input_select.camera_dropdown', 'Kitchen') %}
# media-source://camera/camera.frigate_cam12
# {% elif is_state('input_select.camera_dropdown', 'Computer Area') %}
# media-source://camera/camera.frigate_cam03
# {% elif is_state('input_select.camera_dropdown', 'Garage') %}
# media-source://camera/camera.frigate_cam04
# {% elif is_state('input_select.camera_dropdown', 'Master Bedroom') %}
# media-source://camera/camera.frigate_cam06
# {% elif is_state('input_select.camera_dropdown', 'Nursery') %}
# media-source://camera/camera.frigate_cam08
# {% elif is_state('input_select.camera_dropdown', 'Back Yard') %}
# media-source://camera/camera.frigate_cam14
# {% elif is_state('input_select.camera_dropdown', 'Front Yard') %}
# media-source://camera/camera.frigate_cam19
# {% elif is_state('input_select.camera_dropdown', 'Front Room') %}
# media-source://camera/camera.frigate_cam13
# {% endif %}
# media_content_type: 'image/jpeg'
- service: media_player.volume_set
data:
entity_id: >
{% if is_state('input_select.cast_to_screen_dropdown', 'Front Room Display') %}
media_player.front_room_hub
{% elif is_state('input_select.cast_to_screen_dropdown', 'Nursery Hub') %}
media_player.nursery_hub
{% elif is_state('input_select.cast_to_screen_dropdown', 'Computer Area Hub') %}
media_player.computer_area_hub
{% endif %}
volume_level: 0.100
- service: webrtc.dash_cast
data:
entity_id: >
{% if is_state('input_select.cast_to_screen_dropdown', 'Front Room Display') %}
media_player.front_room_hub
{% elif is_state('input_select.cast_to_screen_dropdown', 'Nursery Hub') %}
media_player.nursery_hub
{% elif is_state('input_select.cast_to_screen_dropdown', 'Computer Area Hub') %}
media_player.computer_area_hub
{% endif %}
url: >
{% if is_state('input_select.camera_dropdown', 'Blue Room') %}
rtsp://192.168.1.11:8554/rtsp_cam01_sub
{% elif is_state('input_select.camera_dropdown', 'Kitchen') %}
rtsp://192.168.1.11:8554/rtsp_cam12_sub
{% elif is_state('input_select.camera_dropdown', 'Computer Area') %}
rtsp://192.168.1.11:8554/rtsp_cam03_sub
{% elif is_state('input_select.camera_dropdown', 'Garage') %}
rtsp://192.168.1.11:8554/rtsp_cam04_sub
{% elif is_state('input_select.camera_dropdown', 'Master Bedroom') %}
rtsp://192.168.1.11:8554/rtsp_cam06_sub
{% elif is_state('input_select.camera_dropdown', 'Nursery') %}
rtsp://192.168.1.11:8554/rtsp_cam08_sub
{% elif is_state('input_select.camera_dropdown', 'Back Yard') %}
rtsp://192.168.1.11:8554/rtsp_cam14_sub
{% elif is_state('input_select.camera_dropdown', 'Front Yard') %}
rtsp://192.168.1.11:8554/rtsp_cam18_sub
{% elif is_state('input_select.camera_dropdown', 'Front Door') %}
rtsp://192.168.1.11:8554/rtsp_cam19_sub
{% elif is_state('input_select.camera_dropdown', 'Front Room') %}
rtsp://192.168.1.11:8554/rtsp_cam13_sub
{% endif %}
force: true
extra:
mode: webrtc
+593
View File
@@ -0,0 +1,593 @@
input_text:
camera14_status:
name: Camera14 Status
icon: mdi:cctv
input_select:
camera14_preset:
name: Camera14 Preset
options:
- Deck
- Sandbox
- Grove
- Grass
- Yard
- Stairs
- BesideStairs
input_button:
# PTZ Controls
cam14_ptz_up:
name: Cam14 PTZ Up
icon: mdi:arrow-up
cam14_ptz_right_up:
name: Cam14 PTZ Right Up
icon: mdi:arrow-top-right
cam14_ptz_right:
name: Cam14 PTZ Right
icon: mdi:arrow-right
cam14_ptz_right_down:
name: Cam14 Right Down
icon: mdi:arrow-bottom-right
cam14_ptz_down:
name: Cam14 PTZ Down
icon: mdi:arrow-down
cam14_ptz_left_down:
name: Cam14 PTZ Left Down
icon: mdi:arrow-bottom-left
cam14_ptz_left:
name: Cam14 PTZ Left
icon: mdi:arrow-left
cam14_ptz_left_up:
name: Cam14 Left Up
icon: mdi:arrow-top-left
cam14_ptz_zoom_in:
name: Cam14 Zoom In
icon: mdi:magnify-plus
cam14_ptz_zoom_out:
name: Cam14 Zoom Out
icon: mdi:magnify-minus
# Camera Preset
cam14_ptz_preset_1:
name: Cam14 Deck
icon: mdi:grill
cam14_ptz_preset_2:
name: Cam14 Sandbox
icon: mdi:pail
cam14_ptz_preset_3:
name: Cam14 Yard
icon: mdi:slide
cam14_ptz_preset_4:
name: Cam14 Grove
icon: mdi:forest
cam14_ptz_preset_5:
name: Cam14 Stairs
icon: mdi:stairs
cam14_ptz_preset_6:
name: Cam14 Preset 6
icon: mdi:stairs-down
cam14_ptz_preset_7:
name: Cam14 Preset 7
icon: mdi:grass
cam14_ptz_preset_8:
name: Cam14 Preset 8
icon: mdi:map-marker
cam14_ptz_preset_9:
name: Cam14 Preset 9
icon: mdi:map-marker
cam14_ptz_preset_10:
name: Cam14 Preset 10
icon: mdi:map-marker
automation:
# - id: automation_cam14_ptz_controls
# alias: Cam14 PTZ Controls
# mode: queued
# trigger:
# - id: up
# platform: state
# entity_id: input_button.cam14_ptz_up
# - id: right_up
# platform: state
# entity_id: input_button.cam14_ptz_right_up
# - id: right
# platform: state
# entity_id: input_button.cam14_ptz_right
# - id: right_down
# platform: state
# entity_id: input_button.cam14_ptz_right_down
# - id: down
# platform: state
# entity_id: input_button.cam14_ptz_down
# - id: left_down
# platform: state
# entity_id: input_button.cam14_ptz_left_down
# - id: left
# platform: state
# entity_id: input_button.cam14_ptz_left
# - id: left_up
# platform: state
# entity_id: input_button.cam14_ptz_left_up
# - id: zoom_in
# platform: state
# entity_id: input_button.cam14_ptz_zoom_in
# - id: zoom_out
# platform: state
# entity_id: input_button.cam14_ptz_zoom_out
# condition: []
# action:
# - service: amcrest.ptz_control
# data:
# entity_id: camera.frigate_cam14
# movement: "{{ trigger.id }}"
# travel_time: 0.5
# - delay: '00:00:01'
# - id: automation_manage_frigate_cam14_motion
# mode: single
# alias: Manage Frigate Cam14 Motion
# description: ""
# trigger:
# - platform: state
# entity_id: input_boolean.cycle_cam14
# - platform: homeassistant
# event: start
# - platform: event
# event_type: automation_reloaded
# action:
# - choose:
# - conditions:
# - condition: state
# entity_id: input_boolean.cycle_cam14
# state: 'off'
# sequence:
# - service: switch.turn_on
# target:
# entity_id: switch.frigate_cam14_motion
# default:
# - service: switch.turn_off
# target:
# entity_id: switch.frigate_cam14_motion
- id: automation_cycle_back_yard_camera
mode: single
alias: Cycle Back Yard Camera
description: ""
trigger:
- platform: state
entity_id: input_boolean.cycle_cam14
- platform: homeassistant
event: start
- platform: event
event_type: automation_reloaded
condition: []
# - alias: "The input_boolean controlling the cycling of cam14 is on"
# condition: state
# entity_id: input_boolean.cycle_cam14
# state: "on"
# - alias: "No people or animals detected by Frigate for the last 5 seconds"
# condition: state
# entity_id: binary_sensor.frigate_cam14_all_occupancy
# state: "off"
# for:
# hours: 0
# minutes: 0
# seconds: 5
# # Either the camera isn't looking at the deck
# # or the camera is looking at the deck and the deck motion sensor has been off for at least 30 seconds
# # or the camera is looking at the deck and the patio door has been closed for at least 30 seconds
# - condition: or
# conditions:
# - alias: "The input_select isn't set to Deck"
# condition: not
# conditions:
# - condition: state
# entity_id: input_select.camera14_preset
# state: "Deck"
# - alias: "The input_select is set to Deck and there hasn't been motion detected on the deck for the last 30 seconds"
# condition: and
# conditions:
# - condition: state
# entity_id: input_select.camera14_preset
# state: "Deck"
# - condition: state
# entity_id: binary_sensor.deck_motion
# state: "off"
# for:
# seconds: 30
# - alias: "The input_select is set to deck and the patio door has been shut for at least 30 seconds"
# condition: and
# conditions:
# - condition: state
# entity_id: input_select.camera14_preset
# state: "Deck"
# - condition: state
# entity_id: binary_sensor.patio_door_contact
# state: "off"
# for:
# seconds: 30
action:
# - alias: "This always cycles the back yard camera every 45 seconds. It should stop cycling when a person is found, but this version doesn't"
# repeat:
# while: "{{ is_state('input_boolean.cycle_cam14', 'on') }}"
# sequence:
# - service: input_select.select_next
# data:
# cycle: true
# target:
# entity_id: input_select.camera14_preset
# - delay: "00:00:45"
- alias: "This should only cycle the back yard camera, if a person isn't found."
repeat:
while: "{{ is_state('input_boolean.cycle_cam14', 'on') }}"
sequence:
- choose:
# If the camera is looking at the deck and the deck motion sensor is on, then wait 5 seconds.
- conditions:
- condition: state
entity_id: input_select.camera14_preset
state: Deck
- condition: state
entity_id: binary_sensor.deck_motion
state: 'on'
sequence:
- service: input_text.set_value
target:
entity_id: input_text.camera14_status
data:
value: "Deck"
- delay: 5
# If a person is not found, cycle to the next preset, then wait 30 seconds.
- conditions:
- condition: template
value_template: "{{ is_state('binary_sensor.frigate_cam14_person_occupancy','off') }}"
sequence:
- service: input_text.set_value
target:
entity_id: input_text.camera14_status
data:
value: "Cycling"
- service: input_select.select_next
data:
cycle: true
target:
entity_id: input_select.camera14_preset
- delay: 30
# If a person is found, check if the person is still present every 5 seconds
default:
- service: input_text.set_value
target:
entity_id: input_text.camera14_status
data:
value: "Focusing"
- repeat:
while: "{{ is_state('binary_sensor.frigate_cam14_person_occupancy','off') }}"
sequence:
- delay: 5
- service: input_text.set_value
target:
entity_id: input_text.camera14_status
data:
value: "Static"
- id: automation_look_at_deck
mode: restart
alias: "Look at deck"
description: "When the patio door is opened, set the camera to the deck preset, if frigate isn't currently detecting anything"
trigger:
- platform: state
entity_id: binary_sensor.patio_door_contact
from: "off"
to: "on"
condition:
- condition: numeric_state
entity_id: sensor.frigate_cam14_all_count
below: 2
action:
# We don't need to turn off cycling the back yard camera.
# - service: input_boolean.turn_off
# target:
# entity_id: input_boolean.cycle_cam14
- service: input_text.set_value
target:
entity_id: input_text.camera14_status
data:
value: "Deck"
- service: input_select.select_option
data:
option: Deck
target:
entity_id: input_select.camera14_preset
# the Cycle cam 14 automation already checks if something is detected. All we need to do is force cam14 to look at the deck
# - delay: "00:00:05"
# - repeat:
# while: "{{ is_state('binary_sensor.frigate_cam14_all_occupancy', 'on')}}"
# sequence:
# - delay: "00:00:05"
# - service: input_boolean.turn_on
# target:
# entity_id: input_boolean.cycle_cam14
- id: automation_back_yard_snapshot
mode: restart
alias: "Back Yard Snapshot"
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: camera.frigate_cam14
to: "streaming"
action:
- service: camera.snapshot
target:
entity_id: camera.frigate_cam14
data:
filename: "/config/tmp/snapshots/cam14-{{states('input_select.camera14_preset')}}-{{now().strftime('%y%m%d-%H%M%S')}}.jpg"
- id: automation_cam14_ptz_preset
alias: Cam14 PTZ Presets
mode: single
max_exceeded: silent
trigger:
- id: Preset 1
platform: state
entity_id: input_button.cam14_ptz_preset_1
- id: Preset 2
platform: state
entity_id: input_button.cam14_ptz_preset_2
- id: Preset 3
platform: state
entity_id: input_button.cam14_ptz_preset_3
- id: Preset 4
platform: state
entity_id: input_button.cam14_ptz_preset_4
- id: Preset 5
platform: state
entity_id: input_button.cam14_ptz_preset_5
- id: Preset 6
platform: state
entity_id: input_button.cam14_ptz_preset_6
- id: Preset 7
platform: state
entity_id: input_button.cam14_ptz_preset_7
- id: Preset 8
platform: state
entity_id: input_button.cam14_ptz_preset_8
- id: Preset 9
platform: state
entity_id: input_button.cam14_ptz_preset_9
- id: Preset 10
platform: state
entity_id: input_button.cam14_ptz_preset_10
action:
- choose:
- conditions: >
{{ trigger.id|replace('Preset ','')|int(default=0) == 1}}
sequence:
- service: input_select.select_option
target:
entity_id: input_select.camera14_preset
data:
option: "Deck"
- conditions: >
{{ trigger.id|replace('Preset ','')|int(default=0) == 2}}
sequence:
- service: input_select.select_option
target:
entity_id: input_select.camera14_preset
data:
option: "Sandbox"
- conditions: >
{{ trigger.id|replace('Preset ','')|int(default=0) == 3}}
sequence:
- service: input_select.select_option
target:
entity_id: input_select.camera14_preset
data:
option: "Yard"
- conditions: >
{{ trigger.id|replace('Preset ','')|int(default=0) == 4}}
sequence:
- service: input_select.select_option
target:
entity_id: input_select.camera14_preset
data:
option: "Grove"
- conditions: >
{{ trigger.id|replace('Preset ','')|int(default=0) == 5}}
sequence:
- service: input_select.select_option
target:
entity_id: input_select.camera14_preset
data:
option: "Stairs"
- conditions: >
{{ trigger.id|replace('Preset ','')|int(default=0) == 6}}
sequence:
- service: input_select.select_option
target:
entity_id: input_select.camera14_preset
data:
option: "BesideStairs"
- conditions: >
{{ trigger.id|replace('Preset ','')|int(default=0) == 7}}
sequence:
- service: input_select.select_option
target:
entity_id: input_select.camera14_preset
data:
option: "Grass"
- service: "shell_command.back_yard_preset_{{ trigger.id|replace('Preset ','')|int(default=1) }}"
# - service: amcrest.goto_preset
# data:
# entity_id: camera.frigate_cam14
# preset: "{{ trigger.id|replace('Preset ','')|int(default=1) }}"
- delay: "00:00:2"
- id: automation_cam14_ptz_move
alias: Cam14 PTZ Move
mode: restart
trigger:
- platform: state
entity_id: input_select.camera14_preset
- platform: state
entity_id: camera.frigate_cam14
from: unavailable
- platform: homeassistant
event: start
- platform: time_pattern
minutes: /10
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.camera14_preset
state: Sandbox
sequence:
- service: input_button.press
data: {}
target:
entity_id: input_button.cam14_ptz_preset_2
- conditions:
- condition: state
entity_id: input_select.camera14_preset
state: Yard
sequence:
- service: input_button.press
data: {}
target:
entity_id: input_button.cam14_ptz_preset_3
- conditions:
- condition: state
entity_id: input_select.camera14_preset
state: Grove
sequence:
- service: input_button.press
data: {}
target:
entity_id: input_button.cam14_ptz_preset_4
- conditions:
- condition: state
entity_id: input_select.camera14_preset
state: Stairs
sequence:
- service: input_button.press
data: {}
target:
entity_id: input_button.cam14_ptz_preset_5
- conditions:
- condition: state
entity_id: input_select.camera14_preset
state: BesideStairs
sequence:
- service: input_button.press
data: {}
target:
entity_id: input_button.cam14_ptz_preset_6
- conditions:
- condition: state
entity_id: input_select.camera14_preset
state: Grass
sequence:
- service: input_button.press
data: {}
target:
entity_id: input_button.cam14_ptz_preset_7
default:
- service: input_button.press
data: {}
target:
entity_id: input_button.cam14_ptz_preset_1
template:
- binary_sensor:
- name: Deck Person Occupancy
unique_id: templatebinarysensor.deck_person_occupancy
availability: "{{ states('binary_sensor.possible_deck_person_occupancy') not in ['unkown', 'unavailable'] }}"
state: "{{ is_state('binary_sensor.possible_deck_person_occupancy','on') and is_state('input_select.camera14_preset','Deck') }}"
icon: >
{% if is_state('binary_sensor.deck_person_occupancy','on') %}
mdi:motion-sensor
{% else %}
mdi:motion-sensor-off
{% endif %}
- name: Deck Animal Motion
unique_id: templatebinarysensor.deck_animal_occupancy
availability: "{{ states('binary_sensor.possible_deck_animal_occupancy') not in ['unkown', 'unavailable'] }}"
state: "{{ is_state('binary_sensor.possible_deck_animal_occupancy','on') and is_state('input_select.camera14_preset','Deck') }}"
icon: mdi:bird
- sensor:
- name: Deck Person Count
unique_id: templatesensor.deck_person_count
availability: "{{ states('sensor.possible_deck_person_count') not in ['unkown', 'unavailable'] }}"
unit_of_measurement: objects
state: >
{% if is_state('input_select.camera14_preset','Deck') %}
{{ states('sensor.possible_deck_person_count') }}
{% else %}
0
{% endif %}
icon: mdi:shield-account
- name: Deck Animal Count
unique_id: templatesensor.deck_animal_count
availability: "{{ states('sensor.possible_deck_animal_count') not in ['unkown', 'unavailable'] }}"
unit_of_measurement: objects
state: >
{% if is_state('input_select.camera14_preset','Deck') %}
{{ states('sensor.possible_deck_animal_count') }}
{% else %}
0
{% endif %}
icon: mdi:paw
@@ -0,0 +1,20 @@
shell_command:
master_bedroom_left_preset_1: !secret master_bedroom_left_preset_1
master_bedroom_left_preset_2: !secret master_bedroom_left_preset_2
master_bedroom_left_preset_3: !secret master_bedroom_left_preset_3
master_bedroom_left_preset_4: !secret master_bedroom_left_preset_4
master_bedroom_left_preset_5: !secret master_bedroom_left_preset_5
master_bedroom_right_preset_1: !secret master_bedroom_right_preset_1
master_bedroom_right_preset_2: !secret master_bedroom_right_preset_2
master_bedroom_right_preset_3: !secret master_bedroom_right_preset_3
master_bedroom_right_preset_4: !secret master_bedroom_right_preset_4
master_bedroom_right_preset_5: !secret master_bedroom_right_preset_5
back_yard_preset_1: !secret back_yard_preset_1
back_yard_preset_2: !secret back_yard_preset_2
back_yard_preset_3: !secret back_yard_preset_3
back_yard_preset_4: !secret back_yard_preset_4
back_yard_preset_5: !secret back_yard_preset_5
back_yard_preset_6: !secret back_yard_preset_6
back_yard_preset_7: !secret back_yard_preset_7
+120
View File
@@ -0,0 +1,120 @@
#binary_sensor: !include_dir_list ../cameras
camera:
# - platform: mjpeg
# name: Octoprint
# still_image_url: http://192.168.1.99/webcam/?action=snapshot
# mjpeg_url: http://192.168.1.99/webcam/?action=stream
# - platform: mjpeg
# mjpeg_url: http://192.168.1.112:80/cgi-bin/mjpg/video.cgi?channel=1&subtype=1
# name: Camera12 MJjpeg
# username: !secret camerausername
# password: !secret camerapassword
# authentication: basic
# - platform: generic
# mjpeg_url: rtmp://192.168.1.7/live/frigate_cam12
# name: Camera12 MJjpeg
# username: !secret bi_username
# password: !secret bi_password
# authentication: basic
- platform: local_file
name: Emmett
file_path: /config/image/4b8a4e30436d64121be7b0b59f857877/512x512
- platform: local_file
name: Bridget
file_path: /config/image/4ce4447957c07525227b0574cbb1e40b/512x512
- platform: local_file
name: Clint
file_path: /config/image/ca19fa93140bf891d9a871858d910c69/512x512
- platform: local_file
name: Ebin
file_path: /config/image/80720d36ba13e7993b992ee2c8c76144/512x512
- platform: local_file
name: Kristy
file_path: /config/image/7dde65b227b3d96cb4546c9c2447db5d/512x512
- platform: local_file
name: Tess
file_path: /config/image/929bf1b71232216f9ed31d8dbdbd7a54/512x512
- platform: local_file
name: Marshall
file_path: /config/image/29196e13641d83e1c54656d88b272c7c/512x512
# amcrest:
# - name: Back Yard
# host: !secret camera14ip
# username: !secret camerausername
# password: !secret camerapassword
# resolution: low
# stream_source: rtsp
# - name: Blue Room
# host: !secret camera01ip
# username: !secret camerausername
# password: !secret camerapassword
# resolution: low
# stream_source: rtsp
# - name: Computer Area
# host: !secret camera03ip
# username: !secret camerausername
# password: !secret camerapassword
# resolution: low
# stream_source: rtsp
# - name: Front Porch
# host: !secret camera19ip
# username: !secret camerausername
# password: !secret camerapassword
# resolution: low
# stream_source: rtsp
# - name: Front Room
# host: !secret camera13ip
# username: !secret camerausername
# password: !secret camerapassword
# resolution: low
# stream_source: rtsp
# - name: Garage
# host: !secret camera04ip
# username: !secret camerausername
# password: !secret camerapassword
# resolution: low
# stream_source: rtsp
# - name: Kitchen
# host: !secret camera12ip
# username: !secret camerausername
# password: !secret camerapassword
# resolution: low
# stream_source: rtsp
# - name: Master Bedroom Left
# host: !secret camera06ip
# username: !secret camerausername
# password: !secret camerapassword
# resolution: low
# stream_source: rtsp
# - name: Master Bedroom Right
# host: !secret camera07ip
# username: !secret camerausername
# password: !secret camerapassword
# resolution: low
# stream_source: rtsp
# - name: Nursery
# host: !secret camera08ip
# username: !secret camerausername
# password: !secret camerapassword
# resolution: low
# stream_source: rtsp
@@ -0,0 +1,146 @@
script:
make_clever_announcement:
alias: Make Clever Announcement
description: Play an announcement cleverly
icon: mdi:bullhorn
mode: queued
fields:
entity_id:
description: Media player to use for announcements (If left empty, uses the ytube music player speaker(s) currently in use)
example: media_player.announcements
selector:
entity:
multiple: false
domain: media_player
media_content_id:
description: "Media Content ID to announce"
example: media-source://media_source/local/Sounds/tts/welcome_to_daddys_house.mp3
selector:
text:
media_content_type:
description: "The media content type of the specified media"
example: audio/mpeg
selector:
text:
volume:
description: "The volume that the announcement should play at"
example: "0.6"
selector:
number:
min: 0.0
max: 1.0
step: 0.01
variables:
# This beast of a line uses the media players in this order:
# If an entity_id was specified, use that always
# If an entity_id was not specified, check if YTube Music Player is in use:
# If YTube Music Player is in use, play the announcement over those speakers
# If YTube Music Player is not in use, play the announcement over the media_player.announcements speaker group
media_player: '{{ iif(entity_id is defined, entity_id, iif(is_state("media_player.ytube_music_player","playing") or is_state("media_player.ytube_music_player","idle") or is_state("media_player.ytube_music_player","paused"),state_attr("media_player.ytube_music_player","remote_player_id"),"media_player.announcements")) }}'
remote_player: '{{ state_attr("media_player.ytube_music_player","remote_player_id") }}'
content_id: '{{ iif(media_content_id is defined,media_content_id,"media-source://media_source/local/Sounds/tts/welcome_to_daddys_house.mp3") }}'
content_type: '{{ iif(media_content_type is defined,media_content_type,"audio/mpeg") }}'
volume: "{{ iif(volume is defined,volume,0.6) }}"
original_volume: '{{ iif(state_attr(state_attr("media_player.ytube_music_player","remote_player_id"), "volume_level") is not none,state_attr(state_attr("media_player.ytube_music_player","remote_player_id"), "volume_level"),0.0) }}'
ytube_in_use: '{{ is_state("media_player.ytube_music_player","playing") or is_state("media_player.ytube_music_player","idle") or is_state("media_player.ytube_music_player","paused") }}'
sequence:
- choose:
- alias: "Ytube music player is playing something"
conditions: "{{ ytube_in_use }}"
sequence:
- alias: "Interrupt ytube music player"
service: ytube_music_player.call_method
entity_id: media_player.ytube_music_player
data:
command: interrupt_start
- alias: "Then wait a second"
delay: "00:00:01"
# This looks to cause the first part of the message to be missed.
# Instead of initally muting the speakers, I'll just set them to the appropriate volume off the bat
# - alias: "Mute the announcement speakers momentarily"
# service: media_player.volume_set
# target:
# entity_id: '{{ media_player }}'
# data:
# volume_level: 0
- alias: "Set the volume on the announcement speakers"
service: media_player.volume_set
target:
entity_id: "{{media_player}}"
data:
volume_level: "{{volume}}"
- alias: "Wait another bit for the volume to be set"
delay:
seconds: 2
- alias: "Play the announcement"
service: media_player.play_media
target:
entity_id: "{{media_player}}"
data:
media_content_id: "{{content_id}}"
media_content_type: "{{content_type}}"
# This is now being done before the announcement is played
# - alias: "Set the volume on the announcement speakers"
# service: media_player.volume_set
# target:
# entity_id: '{{media_player}}'
# data:
# volume_level: '{{volume}}'
# Wait until media player is idle
# This doesn't seem to be working as written. Trying a wait_for_trigger instead
#- wait_template: "{{ is_state(media_player,'idle')}}"
# This shit doesn't work either
- alias: Wait for the specified media_player(s) to become idle
wait_for_trigger:
- platform: template
value_template: "{{ is_state(media_player, 'idle') }}"
- alias: "Give a second of dead air after the announcement"
delay: "00:00:02"
- choose:
- alias: "Ytube music player was playing something earlier"
conditions: "{{ ytube_in_use }}"
sequence:
- alias: "Mute the remote speakers momentarily"
service: media_player.volume_set
target:
entity_id: "{{ remote_player }}"
data:
volume_level: 0
- alias: "Resume the ytube music player playlist"
service: ytube_music_player.call_method
entity_id: media_player.ytube_music_player
data:
command: interrupt_resume
- alias: "Reset the volume of the remote speakers to the previous level"
service: media_player.volume_set
target:
entity_id: "{{ remote_player }}"
data:
volume_level: "{{original_volume}}"
default:
- alias: "Since we're not resuming music, turn off the speakers used to make the announcement"
service: media_player.turn_off
data: {}
target:
entity_id: "{{ media_player }}"
- alias: "Wait at least 1 seconds before handling the next announcement in queue"
delay: "00:00:02"
+61
View File
@@ -0,0 +1,61 @@
template:
# Watch Done Charging
- trigger:
- platform: state
entity_id: sensor.ticwatch_pro_3_gps_charger_type
- platform: state
entity_id: sensor.ticwatch_pro_3_gps_battery_level
- platform: event
event_type: event_template_reloaded
id: "reload"
- platform: homeassistant
event: start
binary_sensor:
- name: Clint's Watch Done Charging
unique_id: templatebinarysensor.clints_watch_done_charging
icon: mdi:battery-charging-100
availability: "{{ states('sensor.ticwatch_pro_3_gps_battery_level') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.ticwatch_pro_3_gps_battery_level')|int(default=0) >= states('input_number.clints_watch_charged')|int(default=0) and is_state('sensor.ticwatch_pro_3_gps_charger_type','ac') }}"
# Watch Done Charging
- trigger:
- platform: state
entity_id: sensor.ticwatch_pro_3_gps_charger_type
- platform: state
entity_id: sensor.ticwatch_pro_3_gps_battery_level
- platform: event
event_type: event_template_reloaded
id: "reload"
- platform: homeassistant
event: start
binary_sensor:
- name: Clint's Watch Needs to Charge
unique_id: templatebinarysensor.clints_watch_needs_to_charge
icon: mdi:battery-20
availability: "{{ states('sensor.ticwatch_pro_3_gps_battery_level') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.ticwatch_pro_3_gps_battery_level')|int(default=0) <= states('input_number.clints_watch_low')|int(default=0) and is_state('sensor.ticwatch_pro_3_gps_charger_type','none') }}"
input_number:
clints_watch_charged:
name: 'Clints Watch Charged'
icon: mdi:battery
min: 0
max: 100
step: 1
mode: box
clints_watch_low:
name: 'Clints Watch Low'
icon: mdi:battery-20
min: 0
max: 100
step: 1
mode: box
+1
View File
@@ -0,0 +1 @@
config:
+1
View File
@@ -0,0 +1 @@
conversation:
+294
View File
@@ -0,0 +1,294 @@
# Recorder is the primary storage place for states, attributes, etc.
# Recorder used to save to a MariaDB instance on the NAS.
# It now saves to the local MariaDB instance
# If Recorder is disable for a specific entity, the history and logbook become unavailable for that entity
# Example Purge
# service: recorder.purge
# data:
# apply_filter: true
# keep_days: 180
recorder:
purge_keep_days: 14
auto_purge: true
db_url: !secret recorder_url
#db_url: !secret recorder_url_nas
db_max_retries: 10
db_retry_wait: 3
#commit_interval: 1
exclude:
entities:
- sensor.date
- sensor.date_time
- sensor.date_time_iso
- sensor.date_time_utc
- sensor.time
- sensor.time_date
- sensor.time_utc
- sensor.last_boot
- sensor.mail_updated
- light.upstairs_public
- input_select.master_bedroom_camera
- automation.cycle_cameras
- input_select.outdoor_camera_cycle
- automation.cam14_ptz_presets
- automation.cam14_ptz_move
- automation.cycle_back_yard_camera
- sensor.grocy_chores
- sensor.grocy_shopping_list
- sensor.grocy_stock
- sensor.grocy_tasks
- sensor.grocy_batteries
- sensor.grocy_meal_plan
entity_globs:
- sensor.*_text
- sensor.*_last_motion
#- sensor.*_battery
- binary_sensor.cam*
- sensor.weather_*
- sensor.acurite*
- sensor.*auto_tare
- sensor.*mac_address
- binary_sensor.*running
- switch.frigate*
#- binary_sensor.*battery*
- automation.*preset
- sensor.mail*
- sensor.ddns*
- sensor.synology_srm*
#- sensor.sun*
- sensor.network*
- sensor.count*
- sensor.*mac_address
#- sensor.*battery_level
#- sensor.*battery
#- sensor.*battery_state
# sensor.ups_battery_charge
- sensor.*_portion
- sensor.gt_*
- sensor.oregon*
- sensor.springfield*
- sensor.opus*
- sensor.wt*
- sensor.*cpu_usage
- binary_sensor.grocy*
- sensor.fineoffset_wh1050*
- sensor.ambietweather*
- sensor.esic*
- sensor.fineoffset_whx080*
- sensor.nexus_*
- sensor.gt_*
- sensor.tfa_*
- sensor.rubicscon_*
- sensor.interlogix*
domains:
- updater
- calendar
- camera
- input_button
# - group
- scene
- button
- remote
# include:
# domains:
# - sensor
# - switch
# - media_player
# - light
# - device_tracker
# - input_boolean
# - binary_sensor
# - input_text
# - input_select
# - automation
# - script
# - input_number
# The history integration tracks everything going on in Home Assistant, and allows the user to visually browse through it.
# It relies on the Recorder integration. If something is blocked by the recorder integration, it won't show up in the history integration.
# I really need to go through the History section, and see if there is anything useful that is worth keeping around.
history:
# include:
# domains:
# - binary_sensor
# - sensor
# - switch
# - light
# exclude:
# entities:
# - binary_sensor.have_custody
# - sensor.mail_image_url
# - automation.cam14_ptz_move
# - automation.cycle_back_yard_camera
# - input_select.camera14_preset
# - input_select.indoor_camera_cycle
# domains:
# - automation
# - updater
# - alert
# - button
# - camera
# - weather
# entity_globs:
# - binary_sensor.55_tcl*
# - binary_sensor.roku_streaming_stick*
# - binary_sensor.dream_nas*
# - binary_sensor.grocy*
# - binary_sensor.dream_nas*
# - sensor.dream_nas*
# - sensor.grocy*
# - sensor.*cpu_percent
# - sensor.*memory_percent
# - sensor.*weight
# - switch.frigate*
# - sensor.*utc
# - sensor.*bssid
# - sensor.*version
# - sensor.mail*
# - sensor.synology_srm*
# #- sensor.sun*
# - sensor.pixel*
# - sensor.network*
# - sensor.dream_nas*
# - sensor.*fps
# - sensor.ups*
# - sensor.*pet
# - sensor.*person
# - sensor.*animal
# - sensor.*vehicle
# - switch.adaptive*
# - sensor.*mac_address
# - sensor.ddns*
# - sensor.count*
# - sensor.*mac_address
# #- sensor.*battery_level
# #- sensor.*battery
# #- sensor.*battery_state
# # sensor.ups_battery_charge
# - sensor.*rssi
# - sensor.*_portion
# - sensor.*raw_value
# - sensor.dreamtablet_audio*
# - sensor.dreambox_audio*
# - sensor.dreamtablet_lastactive*
# - sensor.dreambox_lastactive*
# - sensor.dreamtablet_active*
# - sensor.dreambox_active*
# - sensor.*power_outage_count
logbook:
exclude:
entities:
- sensor.date
- sensor.date_time
- sensor.date_time_iso
- sensor.date_time_utc
- sensor.time
- sensor.time_date
- sensor.time_utc
- sensor.hvac_delta
- sensor.master_bed_person_count
- automation.cam14_ptz_move
- automation.cycle_back_yard_camera
- input_select.camera14_preset
- input_select.indoor_camera_cycle
- sensor.lights_on_count
entity_globs:
- sensor.*_text
- sensor.*_last_motion
- sensor.weather_*
- sensor.*battery_level
- sensor.*battery
- sensor.*battery_state
- sensor.network*
- sensor.openweathermap*
# sensor.ups_battery_charge
#- sensor.sun_*
- sensor.adaptive_lighting_color*
- switch.adaptive_lighting_adapt*
- sensor.*_utc
- sensor.*_portion
- sensor.pm*
- sensor.*raw_value
- sensor.dreamtablet_audio*
- sensor.dreambox_audio*
- sensor.dreamtablet_lastactive*
- sensor.dreambox_lastactive*
- sensor.dreamtablet_active*
- sensor.dreambox_active*
- binary_sensor.*occupancy
- binary_sensor.*motion_detection
- binary_sensor.frigate_*_motion
- sensor.*sensor_status
- number.*_basic
- sensor.*cube*
- sensor.*power_outage_count
domains:
- sun
- device_tracker
# InfluxDB is used for external storage of data and generating pretty charts and graphs that I really don't use anywhere right now...
# As of right now, about the only info I would use are the long-term stats that are already managed in the main database, so there really is no current
# need for influx.
# influxdb:
# # api_version: 2
# # ssl: false
# # host: !secret influxDB_host
# # port: !secret influxDB_port
# # token: !secret influxDB_write_token
# # organization: !secret influxDB_organization
# # bucket: !secret influxDB_bucket
# # tags:
# # source: HA
# # tags_attributes:
# # - friendly_name
# # default_measurement: units
# host: !secret local_influxDB_host
# port: !secret local_influxDB_port
# database: !secret local_influxDB_name
# username: !secret local_influxDB_user
# password: !secret local_influxDB_password
# max_retries: 3
# default_measurement: state
# # sensor:
# # platform: influxdb
# # api_version: 2
# # organization: !secret influxDB_organization
# # token: !secret influxDB_write_token
# # queries:
# # - name: InfluxDB Database Size
# # unit_of_measurement: MB
# # value_template: "{{ (value | float(0) / 1024 /1024) | round(1) }}"
# # group_function: sum
# # measurement: '"monitor"."shard"'
# # database: _internal
# # where: '"database"=''homeassistant'' AND time > now() - 5m'
# # field: diskBytes
# sensor:
# platform: influxdb
# host: !secret local_influxDB_host
# port: !secret local_influxDB_port
# database: !secret local_influxDB_name
# username: !secret local_influxDB_user
# password: !secret local_influxDB_password
# queries:
# - name: InfluxDB Database Size
# unit_of_measurement: MB
# value_template: "{{ (value | float(0) / 1024 /1024) | round(1) }}"
# group_function: sum
# measurement: '"monitor"."shard"'
# database: _internal
# where: '"database"=''homeassistant'' AND time > now() - 5m'
# field: diskBytes
+41
View File
@@ -0,0 +1,41 @@
dialogflow:
intent_script:
Temperature:
speech:
text: The temperature at home is {{ states('sensor.thermostat_temperature') }} degrees
LocateIntent:
speech:
text: >
{%- for state in states.person -%}
{%- if state.name.lower() == User.lower() -%}
{{ state.name }} is at {{ state.state }}
{%- endif -%}
{%- else -%}
Sorry, I don't have any trackers registered.
{%- endfor %}
WhereAreWeIntent:
speech:
text: >
{%- if is_state('person.clint', 'home') and
is_state('person.kristy', 'home') -%}
You are both home, you silly
{%- else -%}
Kristy is at {{ states("person.kristy") }}
and Clint is at {{ states("person.clint") }}
{% endif %}
TurnLights:
speech:
text: Turning {{ Room }} lights {{ OnOff }}
action:
- service: notify.mobile_app_pixel_7
data:
message: Someone asked via apiai to turn {{ Room }} lights {{ OnOff }}
- service_template: >
{%- if OnOff == "on" -%}
switch.turn_on
{%- else -%}
switch.turn_off
{%- endif -%}
data:
entity_id: "switch.light_{{ Room | replace(' ', '_') }}"
+2
View File
@@ -0,0 +1,2 @@
ecobee:
api_key: !secret ecobee_api_key
+1
View File
@@ -0,0 +1 @@
fan: !include_dir_list ../fans
+53
View File
@@ -0,0 +1,53 @@
input_number:
# These numbers control what speed the ceiling fans should default to.
# If a room is occupied, and it is relatively warm, the fan should come on
# These numbers help ensure that when the fan turns on, it creates a noticible difference
master_bedroom_fan_min_temp:
name: Master Bedroom Fan Min Temp
min: 60
max: 80
step: 1
mode: slider
master_bedroom_fan_low_temp:
name: Master Bedroom Fan Low Temp
min: 60
max: 80
step: 1
mode: slider
master_bedroom_fan_medium_temp:
name: Master Bedroom Fan Medium Temp
min: 60
max: 80
step: 1
mode: slider
master_bedroom_fan_high_temp:
name: Master Bedroom Fan High Temp
min: 60
max: 80
step: 1
mode: slider
nursery_fan_min_temp:
name: Nursery Fan Min Temp
min: 60
max: 80
step: 1
mode: slider
nursery_fan_low_temp:
name: Nursery Fan Low Temp
min: 60
max: 80
step: 1
mode: slider
nursery_fan_medium_temp:
name: Nursery Fan Medium Temp
min: 60
max: 80
step: 1
mode: slider
nursery_fan_high_temp:
name: Nursery Fan High Temp
min: 60
max: 80
step: 1
mode: slider
+8
View File
@@ -0,0 +1,8 @@
counter:
system_health:
media_extractor:
media_source:
mobile_app:
my:
# map:
energy:
+2
View File
@@ -0,0 +1,2 @@
ffmpeg:
# ffmpeg_bin: /usr/bin/ffmpeg
+6
View File
@@ -0,0 +1,6 @@
frontend:
themes: !include_dir_merge_named ../../themes
# extra_module_url:
# - /local/community/custom-brand-icons/custom-brand-icons.js
#extra_html_url:
# - /local/custom_ui/state-card-floorplan.html
+344
View File
@@ -0,0 +1,344 @@
google_assistant:
secure_devices_pin: !secret secure_devices_pin
project_id: !secret gAssistSvcAcct_project_id
service_account:
type: !secret gAssistSvcAcct_type
project_id: !secret gAssistSvcAcct_project_id
private_key_id: !secret gAssistSvcAcct_private_key_id
private_key: !secret gAssistSvcAcct_private_key
client_email: !secret gAssistSvcAcct_client_email
client_id: !secret gAssistSvcAcct_client_id
auth_uri: !secret gAssistSvcAcct_auth_uri
token_uri: !secret gAssistSvcAcct_token_uri
auth_provider_x509_cert_url: !secret gAssistSvcAcct_auth_provider_x509_cert_url
client_x509_cert_url: !secret gAssistSvcAcct_client_x509_cert_url
report_state: true
expose_by_default: false
exposed_domains:
# - switch
- camera
# - input_boolean
# - fan
# - cover
entity_config:
light.utility_room_vanity:
name: Vanity
expose: true
room: Utility Room
cover.garage_door:
name: Garage Door
expose: true
room: Garage
lock.patio_door:
name: Patio Door
expose: true
room: Dining Room
aliases:
- Sliding Glass Door
camera.frigate_cam03:
name: Desk Camera
expose: true
aliases:
- Cam Three
- Camera Three
- Computer Desk Cam
- Computer Desk Camera
- Computer Area Cam
- Computer Area Camera
- Computer Cam
- Computer Camera
room: Computer Area
camera.frigate_cam13:
name: Front Room Camera
expose: true
aliases:
- Front Room Cam
room: Front Room
camera.frigate_cam08:
name: Nursery Camera
expose: true
aliases:
- Baby Cam
- Baby Monitor
- Kids Cam
- Kids Room Camera
- Nursery Cam
- Baby Monitor Cam
- Baby Monitor Camera
room: Nursery
input_boolean.announcement_pending:
name: Announcement Pending
expose: true
room: Furnace Room
input_boolean.announce_washing_machine_done:
name: Announce Washing Machine Done
expose: true
room: Utility Room
input_boolean.announce_dryer_done:
name: Announce Dryer Done
expose: true
room: Utility Room
input_boolean.announce_dishwasher_done:
name: Announce Dishwasher Done
expose: true
room: Kitchen
input_boolean.announce_almost_bedtime:
name: Announce Almost Bedtime
expose: true
room: Nursery
input_boolean.announce_goodnight_emmett:
name: Announce Goodnight Emmett
expose: true
room: Nursery
input_boolean.announce_goodnight_bridget:
name: Announce Goodnight Bridget
expose: true
room: Nursery
input_boolean.announce_goodnight_ebin:
name: Announce Goodnight Ebin
expose: true
room: Nursery
input_boolean.announce_goodnight_emmett_bridget:
name: Announce Goodnight Emmett Bridget
expose: true
room: Nursery
input_boolean.announce_goodnight_emmett_ebin:
name: Announce Goodnight Emmett Ebin
expose: true
room: Nursery
input_boolean.announce_goodnight_bridget_ebin:
name: Announce Goodnight Bridget Ebin
expose: true
room: Nursery
input_boolean.announce_goodnight_emmett_bridget_ebin:
name: Announce Goodnight Emmett Bridget Ebin
expose: true
room: Nursery
input_boolean.kids_bedtime:
name: Kids Bedtime
expose: true
aliases:
- Emmetts bedtime
- Bridgets bedtime
- Ebins bedtime
room: Nursery
input_boolean.clint_in_bed:
name: Clint In Bed
expose: true
room: Master Bedroom
input_boolean.kristy_in_bed:
name: Kristy In Bed
expose: true
room: Master Bedroom
input_boolean.marshall_in_bed:
name: Marshall In Bed
expose: true
room: Blue Room
input_boolean.tess_in_bed:
name: Tess In Bed
expose: true
room: Mancave
input_boolean.emmett_in_bed:
name: Emmett In Bed
expose: true
room: Nursery
input_boolean.bridget_in_bed:
name: Bridget In Bed
expose: true
room: Nursery
input_boolean.ebin_in_bed:
name: Ebin In Bed
expose: true
room: Nursery
input_boolean.front_room_occupied:
name: Front Room Lights
expose: true
aliases:
- Front Room
room: Front Room
fan.master_bedroom:
name: Master Bedroom Fan
room: Master Bedroom
expose: true
aliases:
- Fan
- Ceiling Fan
fan.nursery:
name: Nursery Fan
room: Nursery
expose: true
aliases:
- Kids Fan
- Kids Ceiling Fan
# light.christmas_tree_wled:
# name: Christmas Tree
# room: Front Room
# expose: true
# switch.outdoor_plug:
# name: Christmas Lights
# room: Front Yard
# expose: true
# aliases:
# - Front Porch Outlet
# - Outdoor Plug
switch.outdoor_power_monitor_plug:
name: Mickey Mouse
room: Front Yard
expose: true
aliases:
- Mickey Mouse
input_boolean.clint_home_alone:
name: Clint Home Alone
room: Furnace Room
expose: true
input_button.blue_room_chores:
name: Blue Room Chores
room: Blue Room
expose: true
input_button.computer_area_chores:
name: Computer Area Chores
room: Computer Area
expose: true
input_button.dining_room_chores:
name: Dining Room Chores
room: Dining Room
expose: true
input_button.entryway_chores:
name: Entryway Chores
room: Entryway
expose: true
input_button.front_room_chores:
name: Front Room Chores
room: Front Room
expose: true
input_button.furnace_room_chores:
name: Furnace Room Chores
room: Furnace Room
expose: true
input_button.garage_chores:
name: Garage Chores
room: Garage
expose: true
input_button.kitchen_chores:
name: Kitchen Chores
room: Kitchen
expose: true
input_button.great_room_chores:
name: Great Room Chores
room: Great Room
expose: true
input_button.mancave_chores:
name: Mancave Chores
room: Mancave
expose: true
input_button.master_bathroom_chores:
name: Master Bathroom Chores
room: Master Bathroom
expose: true
input_button.master_bedroom_chores:
name: Master Bedroom Chores
room: Master Bedroom
expose: true
input_button.nursery_chores:
name: Nursery Chores
room: Nursery
expose: true
input_button.utility_room_chores:
name: Utility Room Chores
room: Utility Room
expose: true
input_button.all_chores:
name: All Chores
room: Computer Area
expose: true
aliases:
- Chores
input_button.nursery_bedtime:
name: Kids Bedtime
room: Nursery
expose: true
aliases:
- Nursery Bedtime
input_button.nursery_awake:
name: Kids Awake
room: Nursery
expose: true
aliases:
- Nursery Awake
input_button.master_bedroom_bedtime:
name: Adults Bedtime
room: Master Bedroom
expose: true
aliases:
- Master Bedroom Bedtime
input_button.master_bedroom_awake:
name: Adults Awake
room: Master Bedroom
expose: true
aliases:
- Master Bedroom Awake
input_button.blue_room_bedtime:
name: Teens Bedtime
room: Blue Room
expose: true
aliases:
- Blue Room Bedtime
input_button.blue_room_awake:
name: Teens Awake
room: Blue Room
expose: true
aliases:
- Blue Room Awake
+92
View File
@@ -0,0 +1,92 @@
input_boolean:
grocy_all_chores:
name: All Chores
icon: mdi:broom
grocy_all_tasks:
name: All Tasks
icon: mdi:checkbox-marked-circle
daddy_chores:
name: Daddy
icon: mdi:human-male
chickadee_chores:
name: Chickadee
icon: mdi:human-female
marshall_chores:
name: Marshall
icon: mdi:alpha-m-circle-outline
tess_chores:
name: Tess
icon: mdi:alpha-t-circle-outline
emmett_chores:
name: Emmett
icon: mdi:alpha-e-circle
bridget_chores:
name: Bridget
icon: mdi:alpha-b-circle
ebin_chores:
name: Ebin
icon: mdi:alpha-e-circle-outline
blue_room_chores:
name: Blue Room Chores
icon: mdi:yoga
computer_area_chores:
name: Computer Area Chores
icon: mdi:desktop-classic
dining_room_chores:
name: Dining Room Chores
icon: mdi:table-chair
entryway_chores:
name: Entryway Chores
icon: mdi:ceiling-light
front_room_chores:
name: Front Room Chores
icon: mdi:television
furnace_room_chores:
name: Furnace Room Chores
icon: mdi:hvac
garage_chores:
name: Garage Chores
icon: mdi:garage
kitchen_chores:
name: Kitchen Chores
icon: mdi:fridge
great_room_chores:
name: Great Room Chores
icon: mdi:microsoft-xbox-controller
mancave_chores:
name: Mancave Chores
icon: mdi:human-male
master_bathroom_chores:
name: Master Bathroom Chores
icon: mdi:shower
master_bedroom_chores:
name: Master Bedroom Chores
icon: mdi:bed-king
nursery_chores:
name: Nursery Chores
icon: mdi:bunk-bed
utility_room_chores:
name: Utility Room Chores
icon: mdi:washing-machine
+218
View File
@@ -0,0 +1,218 @@
input_select:
grocy_users:
name: Grocy Users
icon: mdi:account-multiple
options:
- Daddy
- Chickadee
- Marshall
- Tess
- Emmett
- Bridget
- Ebin
grocy_purchase:
name: Purchase via Grocy
icon: mdi:form-dropdown
options:
- KCups
- Dishwashing Tablets
- Diet Coke
grocy_consume:
name: Consume via Grocy
icon: mdi:form-dropdown
options:
- KCups
- Dishwashing Tablets
- Diet Coke
input_number:
grocy_consume_purchase:
name: Grocy Consume or Purchase
icon: mdi:tally-mark-5
min: 0
max: 200
mode: box
automation:
- id: grocy_consume_dishwasher_tablet
alias: Consume Dishwasher Tablet
trigger:
- platform: state
entity_id: binary_sensor.dishwasher
to: 'on'
for:
minutes: 10
action:
- alias: "Consume 1 Dishwasher tablet"
service: grocy.consume_product_from_stock
data:
transaction_type: CONSUME
product_id: 14
amount: 1
- id: grocy_purchase_am_meds
alias: 'Purchase AM Meds'
trigger:
- platform: state
entity_id: input_button.grocy_purchase_am_meds
action:
alias: Add 30 AM Meds to stock
service: grocy.add_product_to_stock
data:
product_id: 17
amount: 30
- id: grocy_clint_consume_am_meds
alias: Clint Consume AM Meds
trigger:
- platform: state
entity_id: input_button.grocy_consume_am_meds
- platform: state
entity_id: input_boolean.clint_needs_am_meds
from: 'on'
to: 'off'
action:
- alias: "Clint consume AM meds"
service: grocy.consume_product_from_stock
data:
transaction_type: CONSUME
product_id: 17
amount: 1
- id: grocy_purchase_pm_meds
alias: 'Purchase PM Meds'
trigger:
- platform: state
entity_id: input_button.grocy_purchase_pm_meds
action:
alias: Add 30 PM Meds to stock
service: grocy.add_product_to_stock
data:
product_id: 18
amount: 30
- id: grocy_clint_consume_pm_meds
alias: 'Clint Consume PM Meds'
trigger:
- platform: state
entity_id: input_button.grocy_consume_pm_meds
- platform: state
entity_id: input_boolean.clint_needs_pm_meds
from: 'on'
to: 'off'
action:
- alias: "Clint consume PM meds"
service: grocy.consume_product_from_stock
data:
transaction_type: CONSUME
product_id: 18
amount: 1
- id: grocy_manage_milk
alias: 'Manage Milk'
trigger:
- id: 'consume_milk'
platform: state
entity_id: input_button.grocy_consume_milk
- id: 'purchase_milk'
platform: state
entity_id: input_button.grocy_purchase_milk
action:
- choose:
- conditions:
- condition: trigger
id: consume_milk
sequence:
- alias: "Consume gallon of milk"
service: grocy.consume_product_from_stock
data:
transaction_type: CONSUME
product_id: 33
amount: 128
- conditions:
- condition: trigger
id: purchase_milk
sequence:
- alias: "Purchase gallon of milk"
service: grocy.add_product_to_stock
data:
product_id: 33
amount: 128
- id: grocy_manage_diet_coke
alias: 'Manage Diet Coke'
trigger:
- id: 'consume'
platform: state
entity_id: input_button.grocy_consume_diet_coke
- id: 'purchase'
platform: state
entity_id: input_button.grocy_purchase_diet_coke_12_pack
action:
- choose:
- conditions:
- condition: trigger
id: consume
sequence:
- alias: "Consume Diet Coke"
service: grocy.consume_product_from_stock
data:
transaction_type: CONSUME
product_id: 21
amount: 1
- conditions:
- condition: trigger
id: purchase
sequence:
- alias: "Purchase 12 pack of Diet Coke"
service: grocy.add_product_to_stock
data:
product_id: 21
amount: 12
- id: grocy_consume_kcup
alias: 'Consume K-Cup'
trigger:
- platform: state
entity_id: input_button.grocy_consume_kcup
action:
- alias: "Consume KCup"
service: grocy.consume_product_from_stock
data:
transaction_type: CONSUME
product_id: 20
amount: 1
# script:
# consume_kcup:
# alias: Consume K-Cup
# sequence:
# - alias: "Consume K-Cup"
# service: grocy.consume_product_from_stock
# data:
# transaction_type: CONSUME
# product_id: 20
# amount: 1
+814
View File
@@ -0,0 +1,814 @@
binary_sensor:
- name: "Chore: Mow"
unique_id: rest_binary_sensor.chore_mow
platform: rest
resource: http://192.168.1.11:9192/api/chores/32
icon: mdi:mower-bag
headers:
GROCY-API-KEY: !secret grocy_api_key
accept: "application/json"
value_template: "{{value_json.next_estimated_execution_time}}"
sensor:
- name: "Chore: Mow"
unique_id: rest_sensor.chore_mow
platform: rest
resource: http://192.168.1.11:9192/api/chores/32
icon: mdi:mower-bag
headers:
GROCY-API-KEY: !secret grocy_api_key
accept: "application/json"
value_template: "{{value_json.next_estimated_execution_time}}"
# - name: Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Blue Room Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~blue%20room&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Blue Room Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~blue%20room&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Blue Room Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~blue%20room&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Computer Area Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~computer%20area&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Computer Area Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~computer%20area&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Computer Area Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~computer%20area&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Dining Room Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~dining%20room&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Dining Room Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~dining%20room&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Dining Room Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~dining%20room&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Entryway Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~entryway&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Entryway Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~entryway&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Entryway Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~entryway&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Front Room Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~front%20room&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Front Room Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~front%20room&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Front Room Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~front%20room&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Furnace Room Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~furnace%20room&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Furnace Room Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~furnace%20room&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Furnace Room Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~furnace%20room&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Garage Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~garage&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Garage Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~garage&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Garage Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~garage&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Kitchen Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~kitchen&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Kitchen Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~kitchen&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Kitchen Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~kitchen&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Great Room Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~great%20room&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Great Room Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~great%20room&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Great Room Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~great%20room&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Mancave Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~mancave&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Mancave Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~mancave&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Mancave Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~mancave&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Master Bathroom Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~master%20bathroom&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Master Bathroom Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~master%20bathroom&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Master Bathroom Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~master%20bathroom&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Master Bedroom Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~master%20bedroom&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Master Bedroom Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~master%20bedroom&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Master Bedroom Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~master%20bedroom&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Nursery Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~nursery&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Nursery Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~nursery&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Nursery Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~nursery&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Utility Room Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~utility%20room&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Utility Room Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~utility%20room&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Utility Room Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=chore_name~utility%20room&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Daddy Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D2&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Daddy Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D2&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Daddy Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D2&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Chickadee Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D5&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Chickadee Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D5&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Chickadee Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D5&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Marshall Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D6&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Marshall Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D6&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Marshall Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D6&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Tess Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D7&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Tess Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D7&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Tess Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D7&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Emmett Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D3&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Emmett Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D3&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Emmett Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D3&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Bridget Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D4&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Bridget Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D4&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Bridget Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D4&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Ebin Chore One
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D8&order=next_estimated_execution_time&limit=1&offset=0
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Ebin Chore Two
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D8&order=next_estimated_execution_time&limit=1&offset=1
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
# - name: Ebin Chore Three
# platform: rest
# resource: http://192.168.1.11:9192/api/chores?query%5B%5D=next_execution_assigned_to_user_id%3D8&order=next_estimated_execution_time&limit=1&offset=2
# headers:
# GROCY-API-KEY: !secret grocy_api_key
# value_template: >
# {% if value_json[0] is defined %}
# {{ value_json[0].chore_name }}
# {% else %}
# {{"None"}}
# {% endif %}
+7
View File
@@ -0,0 +1,7 @@
template:
- binary_sensor:
- name: 'HACS Update Available'
unique_id: binary_sensor.hacs_update_available
icon: mdi:alpha-c-box
state: "{{ states('sensor.hacs') | float(default=0) > 0 }}"
availability: "{{ states('sensor.hacs') not in ['unkown', 'unavailable'] }}"
@@ -0,0 +1,25 @@
notify:
name: DreamBox
platform: hass_agent_notifier
resource: !secret dreambox_hassagent
# media_player:
# - name: DreamBox
# platform: hass_agent_mediaplayer
# host: !secret dreambox_ip
# port: 5115
template:
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: sensor.dreambox_lastactive
binary_sensor:
- name: DreamBox Recently Active
unique_id: templatebinarysensor.dreambox_recently_active
icon: mdi:desktop-tower-monitor
#availability: "{{ states('sensor.dreambox_lastactive') not in ['unkown', 'unavailable'] }}"
state: " {{ iif( states('sensor.dreambox_lastactive') == 'unknown' or is_state('sensor.dreambox_lastactive', 'unavailable'), false, as_timestamp(now()) - as_timestamp(states('sensor.dreambox_lastactive'),0) < 180 or is_state('sensor.dreambox_usernotification','Busy'))}}"
@@ -0,0 +1,38 @@
notify:
name: DreamSurface
platform: hass_agent_notifier
resource: !secret dreamsurface_hassagent
mqtt:
light:
- name: "DreamSurface: Screen Brightness"
unique_id: "dreamsurface_screen_brightness"
object_id: "dreamsurface_monitor_brightness"
command_topic: "homeassistant/light/DREAMSURFACE/DREAMSURFACE_screen_brightness/action"
brightness_command_topic: "homeassistant/light/HASSAGENT/dreamsurface_monitor_brightness/action"
brightness_command_template: "%PROGRAMFILES(X86)%\\Monitorian\\Monitorian.exe /set {{ value }}"
brightness_scale: 100
on_command_type: 'brightness'
icon: mdi:monitor-shimmer
# media_player:
# - name: Dreamsurface
# platform: hass_agent_mediaplayer
# host: !secret dreamsurface_ip
# port: 5115
template:
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: sensor.dreamsurface_lastactive
binary_sensor:
- name: DreamSurface Recently Active
unique_id: templatebinarysensor.dreamsurface_recently_active
icon: mdi:tablet
#availability: "{{ states('sensor.dreamsurface_lastactive') not in ['unkown', 'unavailable'] }}"
state: " {{ iif( states('sensor.dreamsurface_lastactive') == 'unknown' or is_state('sensor.dreamsurface_lastactive', 'unavailable'), false, as_timestamp(now()) - as_timestamp(states('sensor.dreamsurface_lastactive'),0) < 180 or is_state('sensor.dreamsurface_usernotification','Busy'))}}"
@@ -0,0 +1,6 @@
notify:
- platform: group
name: "Hass Agent Group"
services:
- service: dreambox
- service: dreamsurface
+11
View File
@@ -0,0 +1,11 @@
binary_sensor: !include_dir_list ../binary_sensors
input_boolean: !include_dir_named ../input_booleans
input_button: !include_dir_merge_named ../input_buttons
input_datetime: !include_dir_merge_named ../input_datetime
input_number: !include_dir_named ../input_numbers
input_select: !include_dir_named ../input_selects
input_text: !include_dir_named ../input_text
timer: !include_dir_merge_named ../timers
sensor: !include_dir_list ../sensors
schedule:
sun:
+31
View File
@@ -0,0 +1,31 @@
http:
#ssl_certificate: /ssl/origin.pem
#ssl_key: /ssl/privkey.pem
ip_ban_enabled: true
login_attempts_threshold: 5
use_x_forwarded_for: true
trusted_proxies:
- 192.168.1.0/24
- 127.0.0.1
- 172.30.32.0/23
- 172.16.0.0/12
- 172.17.0.0/16
- ::1
- 172.21.0.145
# Add the Cloudflare IPs as trusted proxies https://www.cloudflare.com/ips-v4
- 173.245.48.0/20
- 103.21.244.0/22
- 103.22.200.0/22
- 103.31.4.0/22
- 141.101.64.0/18
- 108.162.192.0/18
- 190.93.240.0/20
- 188.114.96.0/20
- 197.234.240.0/22
- 198.41.128.0/17
- 162.158.0.0/15
- 104.16.0.0/13
- 104.24.0.0/14
- 172.64.0.0/13
- 131.0.72.0/22
+11
View File
@@ -0,0 +1,11 @@
sensor:
- platform: min_max
unique_id: sensor_lowest_hue_device_battery
name: Lowest Hue Device Battery
type: min
entity_ids:
- sensor.bar_battery
- sensor.entryway_battery
- sensor.front_room_battery
- sensor.front_porch_battery
- sensor.deck_battery
+69
View File
@@ -0,0 +1,69 @@
template:
# - trigger:
# - platform: state
# entity_id: climate.thermostat
# not_from:
# - "unknown"
# - "unavailable"
# - platform: event
# event_type: event_template_reloaded
# id: "reload"
# - platform: homeassistant
# event: start
- binary_sensor:
- name: "HVAC: Aux"
unique_id: "custom_binary_sensor.hvac_aux"
icon: mdi:fire
device_class: running
availability: "{{ states('climate.thermostat') not in ['unkown', 'unavailable'] }}"
state: >
{% if 'aux' in state_attr('climate.thermostat','equipment_running') %}{{'true'}}{% else %}{{'false'}}{% endif %}
# - trigger:
# - platform: state
# entity_id: climate.thermostat
# not_from:
# - "unknown"
# - "unavailable"
# - platform: event
# event_type: event_template_reloaded
# id: "reload"
# - platform: homeassistant
# event: start
- binary_sensor:
- name: "HVAC: Fan"
unique_id: "custom_binary_sensor.hvac_fan"
icon: mdi:fan
device_class: running
availability: "{{ states('climate.thermostat') not in ['unkown', 'unavailable'] }}"
state: >
{% if 'fan' in state_attr('climate.thermostat','equipment_running') %}{{'true'}}{% else %}{{'false'}}{% endif %}
# - trigger:
# - platform: state
# entity_id: climate.thermostat
# not_from:
# - "unknown"
# - "unavailable"
# - platform: event
# event_type: event_template_reloaded
# id: "reload"
# - platform: homeassistant
# event: start
- binary_sensor:
- name: "HVAC: Heat Pump"
unique_id: "custom_binary_sensor.hvac_heatpump"
icon: mdi:hvac
device_class: running
availability: "{{ states('climate.thermostat') not in ['unkown', 'unavailable'] }}"
state: >
{% if 'heatPump' in state_attr('climate.thermostat','equipment_running') %}{{'true'}}{% else %}{{'false'}}{% endif %}
+211
View File
@@ -0,0 +1,211 @@
sensor:
- platform: min_max
name: Upstairs Max Temperature
type: max
entity_ids:
- sensor.master_bedroom_multisensor_air_temperature
- sensor.nursery_multisensor_air_temperature
- sensor.thermostat_temperature
- sensor.bar_temperature
- sensor.front_room_thermostat_temperature
- sensor.kitchen_multisensor_air_temperature
- platform: min_max
name: Upstairs Min Temperature
type: min
entity_ids:
- sensor.master_bedroom_multisensor_air_temperature
- sensor.nursery_multisensor_air_temperature
- sensor.thermostat_temperature
- sensor.bar_temperature
- sensor.front_room_thermostat_temperature
- sensor.kitchen_multisensor_air_temperature
- platform: min_max
name: Upstairs Mean Temperature
type: mean
entity_ids:
- sensor.master_bedroom_multisensor_air_temperature
- sensor.nursery_multisensor_air_temperature
- sensor.thermostat_temperature
- sensor.bar_temperature
- sensor.front_room_thermostat_temperature
- sensor.kitchen_multisensor_air_temperature
- platform: min_max
name: Upstairs Max Humidity
type: max
entity_ids:
- sensor.master_bedroom_multisensor_humidity
- sensor.nursery_multisensor_humidity
- sensor.front_room_thermostat_humidity
- sensor.kitchen_multisensor_humidity
- sensor.thermostat_humidity
- platform: min_max
name: Upstairs Min Humidity
type: min
entity_ids:
- sensor.master_bedroom_multisensor_humidity
- sensor.nursery_multisensor_humidity
- sensor.front_room_thermostat_humidity
- sensor.kitchen_multisensor_humidity
- sensor.thermostat_humidity
- platform: min_max
name: Upstairs Mean Humidity
type: mean
entity_ids:
- sensor.master_bedroom_multisensor_humidity
- sensor.nursery_multisensor_humidity
- sensor.front_room_thermostat_humidity
- sensor.kitchen_multisensor_humidity
- sensor.thermostat_humidity
- platform: min_max
name: Downstairs Max Temperature
type: max
entity_ids:
- sensor.computer_area_multisensor_air_temperature
- sensor.mancave_thermostat_temperature
- sensor.blue_room_thermostat_temperature
- sensor.great_room_multisensor_air_temperature
- sensor.furnace_room_temperature
- platform: min_max
name: Downstairs Min Temperature
type: min
entity_ids:
- sensor.computer_area_multisensor_air_temperature
- sensor.mancave_thermostat_temperature
- sensor.blue_room_thermostat_temperature
- sensor.great_room_multisensor_air_temperature
- platform: min_max
name: Downstairs Mean Temperature
type: mean
entity_ids:
- sensor.computer_area_multisensor_air_temperature
- sensor.mancave_thermostat_temperature
- sensor.blue_room_thermostat_temperature
- sensor.great_room_multisensor_air_temperature
- platform: min_max
name: Downstairs Max Humidity
type: max
entity_ids:
- sensor.computer_area_multisensor_humidity
- sensor.great_room_multisensor_humidity
- sensor.mancave_thermostat_humidity
- sensor.blue_room_thermostat_humidity
- platform: min_max
name: Downstairs Min Humidity
type: min
entity_ids:
- sensor.computer_area_multisensor_humidity
- sensor.great_room_multisensor_humidity
- sensor.mancave_thermostat_humidity
- sensor.blue_room_thermostat_humidity
- platform: min_max
name: Downstairs Mean Humidity
type: mean
entity_ids:
- sensor.computer_area_multisensor_humidity
- sensor.great_room_multisensor_humidity
- sensor.mancave_thermostat_humidity
- sensor.blue_room_thermostat_humidity
- platform: statistics
unique_id: statistics_outdoors_mean_temperature
name: Outdoors Mean Temperature
entity_id: sensor.outdoors_temp_mean
state_characteristic: mean
sampling_size: 20
precision: 1
max_age:
minutes: 5
- platform: min_max
name: Outdoors Temp Mean
type: mean
entity_ids:
- sensor.lacrosse_tx141thbv2_0_54_temperature
- sensor.front_porch_temperature
- sensor.deck_temperature
- platform: history_stats
name: AC Cooling Time Today
entity_id: sensor.hvac_action
state: "cooling"
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
- platform: history_stats
name: AC Cooling Time Past Week
entity_id: sensor.hvac_action
state: "cooling"
type: time
start: "{{ as_timestamp( now().replace(hour=0, minute=0, second=0) ) - now().weekday() * 86400 }}"
end: "{{ now() }}"
- platform: history_stats
name: AC Cooling Time Past Month
entity_id: sensor.hvac_action
state: "cooling"
type: time
end: "{{ now().replace(hour=0, minute=0, second=0) }}"
duration:
days: 30
- platform: history_stats
name: AC Fan Time Today
entity_id: sensor.hvac_action
state: "fan"
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
- platform: history_stats
name: AC Fan Time Past Week
entity_id: sensor.hvac_action
state: "fan"
type: time
start: "{{ as_timestamp( now().replace(hour=0, minute=0, second=0) ) - now().weekday() * 86400 }}"
end: "{{ now() }}"
- platform: history_stats
name: AC Fan Time Past Month
entity_id: sensor.hvac_action
state: "fan"
type: time
end: "{{ now().replace(hour=0, minute=0, second=0) }}"
duration:
days: 30
- platform: history_stats
name: AC Heating Time Today
entity_id: sensor.hvac_action
state: "heating"
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
- platform: history_stats
name: AC Heating Time Past Week
entity_id: sensor.hvac_action
state: "heating"
type: time
start: "{{ as_timestamp( now().replace(hour=0, minute=0, second=0) ) - now().weekday() * 86400 }}"
end: "{{ now() }}"
- platform: history_stats
name: AC Heating Time Past Month
entity_id: sensor.hvac_action
state: "heating"
type: time
end: "{{ now().replace(hour=0, minute=0, second=0) }}"
duration:
days: 30
+24
View File
@@ -0,0 +1,24 @@
binary_sensor:
- platform: generic_hygrostat
name: Master Bathroom Hygrostat
sensor: sensor.master_bathroom_thermostat_humidity # Source humidity sensor
#attribute: humidity # Optional use sensor attribute instead of state.
delta_trigger: 3 # Optional humidity swing to detect. Default = 3
target_offset: 10 # Optional dehumidification target offset. Default = 3
min_on_time: 300 # Optional min on time in seconds. Default = 0 seconds
max_on_time: 1800 # Optional safety max on time in seconds. Default = 7200 seconds
sample_interval: 60 # Optional time between taking humidity samples in seconds, default 300 seconds
min_humidity: 55 # Optional minimum humidity to enable dehumidification. Default = 0
unique_id: master_bathroom_hygrostat # Optional ID that uniquely identifies this sensor. Set this to a unique value to allow customization through the UI.
- platform: generic_hygrostat
name: Utility Room Hygrostat
sensor: sensor.utility_room_thermostat_humidity # Source humidity sensor
#attribute: humidity # Optional use sensor attribute instead of state.
delta_trigger: 5 # Optional humidity swing to detect. Default = 3
target_offset: 10 # Optional dehumidification target offset. Default = 3
min_on_time: 300 # Optional min on time in seconds. Default = 0 seconds
max_on_time: 1800 # Optional safety max on time in seconds. Default = 7200 seconds
sample_interval: 60 # Optional time between taking humidity samples in seconds, default 300 seconds
min_humidity: 55 # Optional minimum humidity to enable dehumidification. Default = 0
unique_id: utility_room_hygrostat # Optional ID that uniquely identifies this sensor. Set this to a unique value to allow customization through the UI.
+18
View File
@@ -0,0 +1,18 @@
# sensor:
# - platform: imap
# name: 'Chickadee: All'
# server: !secret imap_server
# port: 993
# username: !secret imap_username
# password: !secret imap_password
# search: !secret imap_search_1
# charset: US-ASCII
# - platform: imap
# name: 'Chickadee: Unread'
# server: !secret imap_server
# port: 993
# username: !secret imap_username
# password: !secret imap_password
# search: !secret imap_search_2
# charset: US-ASCII
+1
View File
@@ -0,0 +1 @@
intent_script: !include_dir_named ../intent_scripts
+92
View File
@@ -0,0 +1,92 @@
input_number:
keurig_on:
name: Keurig On
min: 0
max: 2000
step: 0.1
mode: box
keurig_warming_water:
name: Keurig Warming Water
min: 0
max: 2000
step: 0.1
mode: box
keurig_brewing:
name: Keurig Brewing
min: 0
max: 2000
step: 0.1
mode: box
keurig_pouring:
name: Keurig Pouring
min: 0
max: 2000
step: 0.1
mode: box
keurig_carafe:
name: Keurig Carafe
min: 0
max: 2000
step: 0.1
mode: box
binary_sensor:
- platform: template
sensors:
keurig_on:
friendly_name: 'Keurig On'
value_template: "{{ states('sensor.pm_kitchen_2_w') | float(default=0) < states('input_number.keurig_on') | float(default=0) }}"
keurig_warming_water:
friendly_name: 'Keurig Warming Water'
value_template: "{{ states('sensor.pm_kitchen_2_w') | float(default=0) > states('input_number.keurig_warming_water') | float(default=0) }}"
delay_off: "00:00:20"
keurig_brewing:
friendly_name: 'Keurig Brewing'
value_template: "{{ states('sensor.pm_kitchen_2_w') | float(default=0) > states('input_number.keurig_brewing') | float(default=0) }}"
keurig_pouring:
friendly_name: 'Keurig Pouring'
value_template: "{{ states('sensor.pm_kitchen_2_w') | float(default=0) > states('input_number.keurig_pouring') | float(default=0) }}"
keurig: #This still needs to watch the Shelly sensor, rather than the circuit, so devices plugged into other outlets don't interfere with this sensor.
unique_id: templatebinarysensor.keurig
friendly_name: Keurig
value_template: "{{ states('sensor.shelly_keurig_w') | float(default=0) > states('input_number.keurig_brewing') | float(default=0) }}"
delay_on:
seconds: 50 # If you press a button the keurig will wake up, but not actually brew.
delay_off:
seconds: 30
icon_template: mdi:coffee-maker
attribute_templates:
model_number: 'K-Duo Essentials'
serial_number: '5000 3100 08558 19'
power: "{{ states('sensor.shelly_keurig_w') | float(default=0)}}"
target: "{{ states('input_number.keurig_brewing') | float(default=0)}}"
keurig_carafe:
unique_id: templatebinarysensor.keurig_carafe
friendly_name: Keurig Carafe
value_template: "{{ states('sensor.shelly_keurig_w') | float(default=0) > states('input_number.keurig_carafe') | float(default=0) }}"
# The largest cup takes just under 3 minutes to brew. If the keurig is on for over 3 minutes
# someone is brewing a pot of coffee, rather than using a k-cup
delay_on:
minutes: 4
# If this sensor is still on when binary_sensor.keurig turns off, a K-Cup was brewed and should
# be considered consumed.
delay_off:
seconds: 40
icon_template: mdi:coffee-maker
attribute_templates:
model_number: 'K-Duo Essentials'
serial_number: '5000 3100 08558 19'
power: "{{ states('sensor.shelly_keurig_w') | float(default=0)}}"
target: "{{ states('input_number.keurig_carafe') | float(default=0)}}"
+69
View File
@@ -0,0 +1,69 @@
script:
light_cycle:
sequence:
- service: homeassistant.turn_on
entity_id: light.front_room_hue
data_template:
brightness: 250
color_name: >
{% set colors = ['red', 'yellow' , 'blue', 'green' , 'purple'] %}
{{ colors|random }}
transition: 1
# Wait until the loop_lights script has finished running
- delay: '00:00:02'
- wait_template: "{{ is_state('script.loop_lights', 'off') }}"
- service: script.loop_lights
loop_lights:
sequence:
- delay: '00:00:02'
# Wait until the light_cycle script has finished running
- wait_template: "{{ is_state('script.light_cycle', 'off') }}"
- service: script.light_cycle
automation:
- alias: Light Cycle Start
id: automation_light_cycle_start
trigger:
- platform: state
entity_id: input_boolean.front_room_light_cycle
to: 'on'
action:
- service: input_text.set_value
# Again, note the use of 'data_template:' rather than the normal 'data:' if you weren't using an input variable.
data_template:
entity_id: input_text.front_room_mode
value: "{{ states('input_select.front_room_mode') }}"
- service: input_select.select_option
data:
entity_id: input_select.front_room_mode
option: 'Off'
- service: script.light_cycle
- alias: Light Cycle Stop
id: automation_light_cycle_stop
trigger:
- platform: state
entity_id: input_boolean.front_room_light_cycle
to: 'off'
action:
- service: homeassistant.turn_off
entity_id:
- script.light_cycle
- script.loop_lights
- service: input_select.select_option
data_template:
entity_id: input_select.front_room_mode
option: "{{ states('input_text.front_room_mode') }}"
- service: input_boolean.toggle
data:
entity_id: input_boolean.front_room_occupied
- delay: '00:00:01'
- service: input_boolean.toggle
data:
entity_id: input_boolean.front_room_occupied
+1
View File
@@ -0,0 +1 @@
light: !include_dir_list ../lights
+53
View File
@@ -0,0 +1,53 @@
# Example configuration.yaml entry
logger:
default: warning
logs:
# WebRTC issues
custom_components.webrtc: debug
# Grocy issues
# pygrocy.grocy_api_client: debug
# custom_components.grocy: debug
# log level for HA core
homeassistant.core: warning
#homeassistant.components.websocket_api: debug
# log level for MQTT integration
#homeassistant.components.mqtt: debug
# log level for all python scripts
#homeassistant.components.python_script: warning
# log level for the device_tracker component
homeassistant.components.device_tracker: warning
# homeassistant.components.rest_command: debug
homeassistant.components.http.ban: warning
#homeassistant.components.http: debug
#homeassistant.components.zwave_js: debug
#homeassistant.components.hue: warning
#homeassistant.components.webhook: debug
#homeassistant.components.automation: debug
#homeassistant.compononts.device_registry: debug
# Home Assistant database upgrade progress messages
homeassistant.components.recorder.migration: info
filters:
pychromecast.socket_client:
- ".*socket.*"
- ".*Failed to connect to service.*"
custom_components.grocy:
- ".*last_used.*"
homeassistant.components.roku.coordinator:
- ".*Timeout occurred.*"
+46
View File
@@ -0,0 +1,46 @@
lovelace:
mode: yaml
resources: !include ../../lovelace/resources.yaml
dashboards:
lovelace-yaml:
mode: yaml
title: Daddy's House
icon: mdi:home
show_in_sidebar: true
filename: ui-lovelace.yaml
data-yml:
mode: yaml
title: Data
icon: mdi:chart-line
show_in_sidebar: true
filename: ui-data.yaml
ai-yml:
mode: yaml
title: Cameras
icon: mdi:cctv
show_in_sidebar: true
filename: ui-cameras.yaml
phone-yaml:
mode: yaml
title: Phone Dashboard
icon: mdi:cellphone
show_in_sidebar: true
filename: ui-phone.yaml
cams-yml:
mode: yaml
title: Cams
icon: mdi:camcorder
show_in_sidebar: false
filename: ui-cams.yaml
camera-casting-yml:
mode: yaml
title: Camera Casting
icon: mdi:cast
show_in_sidebar: false
filename: ui-camera-cast.yaml
details-yml:
mode: yaml
title: Details
icon: mdi:magnify
show_in_sidebar: false
filename: ui-details.yaml
@@ -0,0 +1,436 @@
template:
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: input_number.blue_room_light_level_trigger
- platform: state
entity_id: sensor.blue_room_multisensor_illuminance
binary_sensor:
- name: "Blue Room Naturally Lit"
unique_id: templatebinarysensor_blueroomnaturallylit
delay_on:
seconds: 3
delay_off:
seconds: 3
state: >
{{ states('sensor.blue_room_multisensor_illuminance') | float(default=0) > states('input_number.blue_room_light_level_trigger') | float(default=0) }}
icon: >
{% if states('sensor.blue_room_multisensor_illuminance') | float(default=0) > states('input_number.blue_room_light_level_trigger') | float(default=0) %}
mdi:weather-sunny
{% else %}
mdi:weather-sunny-off
{% endif %}
attributes:
illuminance: "{{ states('sensor.blue_room_multisensor_illuminance') | float(default=0) }}"
trigger: "{{ states('input_number.blue_room_light_level_trigger') | float(default=0) }}"
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: input_number.computer_area_light_level_trigger
- platform: state
entity_id: sensor.computer_area_multisensor_illuminance
binary_sensor:
- name: "Computer Area Naturally Lit"
unique_id: templatebinarysensor_computerareanaturallylit
delay_on:
seconds: 3
delay_off:
seconds: 3
state: >
{{ states('sensor.computer_area_multisensor_illuminance') | float(default=0) > states('input_number.computer_area_light_level_trigger') | float(default=0) }}
icon: >
{% if states('sensor.computer_area_multisensor_illuminance') | float(default=0) > states('input_number.computer_area_light_level_trigger') | float(default=0) %}
mdi:weather-sunny
{% else %}
mdi:weather-sunny-off
{% endif %}
attributes:
illuminance: "{{ states('sensor.computer_area_multisensor_illuminance') | float(default=0) }}"
trigger: "{{ states('input_number.computer_area_light_level_trigger') | float(default=0) }}"
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: input_number.deck_light_level_trigger
- platform: state
entity_id: sensor.deck_light_level
binary_sensor:
- name: "Deck Naturally Lit"
unique_id: templatebinarysensor_decknaturallylit
delay_on:
seconds: 3
delay_off:
seconds: 3
state: >
{{ states('sensor.deck_light_level') | float(default=0) > states('input_number.deck_light_level_trigger') | float(default=0) }}
icon: >
{% if states('sensor.deck_light_level') | float(default=0) > states('input_number.deck_light_level_trigger') | float(default=0) %}
mdi:weather-sunny
{% else %}
mdi:weather-sunny-off
{% endif %}
attributes:
illuminance: "{{ states('sensor.deck_light_level') | float(default=0) }}"
trigger: "{{ states('input_number.deck_light_level_trigger') | float(default=0) }}"
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: input_number.dining_room_light_level_trigger
- platform: state
entity_id: sensor.dining_room_multisensor_illuminance
to:
- platform: event
event_type: event_template_reloaded
binary_sensor:
- name: "Dining Room Naturally Lit"
unique_id: templatebinarysensor_diningroomnaturallylit
availability: "{{ states('sensor.dining_room_multisensor_illuminance') not in ['unkown', 'unavailable'] }}"
delay_on:
seconds: 3
delay_off:
seconds: 3
state: >
{{ states('sensor.dining_room_multisensor_illuminance')| float(default=0) > states('input_number.dining_room_light_level_trigger')| float(default=0) }}
icon: >
{% if states('sensor.dining_room_multisensor_illuminance')| float(default=0) > states('input_number.dining_room_light_level_trigger')| float(default=0) %}
mdi:weather-sunny
{% else %}
mdi:weather-sunny-off
{% endif %}
attributes:
illuminance: "{{ states('sensor.dining_room_multisensor_illuminance') | float(default=0) }}"
trigger: "{{ states('input_number.dining_room_light_level_trigger') | float(default=0) }}"
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: input_number.entryway_light_level_trigger
- platform: state
entity_id: sensor.entryway_light_level
binary_sensor:
- name: "Entryway Naturally Lit"
unique_id: templatebinarysensor_entrywaynaturallylit
delay_on:
seconds: 3
delay_off:
seconds: 3
state: >
{{ states('sensor.entryway_light_level') | float(default=0) > states('input_number.entryway_light_level_trigger') | float(default=0) }}
icon: >
{% if states('sensor.entryway_light_level') | float(default=0) > states('input_number.entryway_light_level_trigger') | float(default=0) %}
mdi:weather-sunny
{% else %}
mdi:weather-sunny-off
{% endif %}
attributes:
illuminance: "{{ states('sensor.entryway_light_level') | float(default=0) }}"
trigger: "{{ states('input_number.entryway_light_level_trigger') | float(default=0) }}"
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: input_number.front_porch_light_level_trigger
- platform: state
entity_id: sensor.front_porch_light_level
binary_sensor:
- name: "Front Porch Naturally Lit"
unique_id: templatebinarysensor_frontporchnaturallylit
delay_on:
seconds: 3
delay_off:
seconds: 3
state: >
{{ states('sensor.front_porch_light_level') | float(default=0) > states('input_number.front_porch_light_level_trigger') | float(default=0) }}
icon: >
{% if states('sensor.front_porch_light_level') | float(default=0) > states('input_number.front_porch_light_level_trigger') | float(default=0) %}
mdi:weather-sunny
{% else %}
mdi:weather-sunny-off
{% endif %}
attributes:
illuminance: "{{ states('sensor.front_porch_light_level') | float(default=0) }}"
trigger: "{{ states('input_number.front_porch_light_level_trigger') | float(default=0) }}"
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: input_number.front_room_light_level_trigger
- platform: state
entity_id: sensor.front_room_light_level
binary_sensor:
- name: "Front Room Naturally Lit"
unique_id: templatebinarysensor_frontroomnaturallylit
delay_on:
seconds: 3
delay_off:
seconds: 3
state: >
{{ states('sensor.front_room_light_level') | float(default=0) > states('input_number.front_room_light_level_trigger') | float(default=0) }}
icon: >
{% if states('sensor.front_room_light_level') | float(default=0) > states('input_number.front_room_light_level_trigger') | float(default=0) %}
mdi:weather-sunny
{% else %}
mdi:weather-sunny-off
{% endif %}
attributes:
illuminance: "{{ states('sensor.front_room_light_level') | float(default=0) }}"
trigger: "{{ states('input_number.front_room_light_level_trigger') | float(default=0) }}"
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: input_number.garage_overhead_light_level_trigger
- platform: state
entity_id: sensor.garage_multisensor_illuminance
binary_sensor:
- name: "Garage Naturally Lit"
unique_id: templatebinarysensor_garagenaturallylit
delay_on:
seconds: 3
delay_off:
seconds: 3
state: >
{{ states('sensor.garage_multisensor_illuminance') | float(default=0) > states('input_number.garage_overhead_light_level_trigger') | float(default=0) }}
icon: >
{% if states('sensor.garage_multisensor_illuminance') | float(default=0) > states('input_number.garage_overhead_light_level_trigger') | float(default=0) %}
mdi:weather-sunny
{% else %}
mdi:weather-sunny-off
{% endif %}
attributes:
illuminance: "{{ states('sensor.garage_multisensor_illuminance') | float(default=0) }}"
trigger: "{{ states('input_number.garage_overhead_light_level_trigger') | float(default=0) }}"
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: input_number.great_room_light_level_trigger
- platform: state
entity_id: sensor.great_room_multisensor_illuminance
binary_sensor:
- name: "Great Room Naturally Lit"
unique_id: templatebinarysensor_greatroomnaturallylit
delay_on:
seconds: 3
delay_off:
seconds: 3
state: >
{{ states('sensor.great_room_multisensor_illuminance') | float(default=0) > states('input_number.great_room_light_level_trigger') | float(default=0) }}
icon: >
{% if states('sensor.great_room_multisensor_illuminance') | float(default=0) > states('input_number.great_room_light_level_trigger') | float(default=0) %}
mdi:weather-sunny
{% else %}
mdi:weather-sunny-off
{% endif %}
attributes:
illuminance: "{{ states('sensor.great_room_multisensor_illuminance') | float(default=0) }}"
trigger: "{{ states('input_number.great_room_light_level_trigger') | float(default=0) }}"
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: input_number.kitchen_light_level_trigger
- platform: state
entity_id: sensor.kitchen_multisensor_illuminance
binary_sensor:
- name: "Kitchen Naturally Lit"
unique_id: templatebinarysensor_kitchennaturallylit
delay_on:
seconds: 3
delay_off:
seconds: 3
state: >
{{ states('sensor.kitchen_multisensor_illuminance') | float(default=0) > states('input_number.kitchen_light_level_trigger') | float(default=0) }}
icon: >
{% if states('sensor.kitchen_multisensor_illuminance') | float(default=0) > states('input_number.kitchen_light_level_trigger') | float(default=0) %}
mdi:weather-sunny
{% else %}
mdi:weather-sunny-off
{% endif %}
attributes:
illuminance: "{{ states('sensor.kitchen_multisensor_illuminance') | float(default=0) }}"
trigger: "{{ states('input_number.kitchen_light_level_trigger') | float(default=0) }}"
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id:
- input_number.master_bedroom_light_level_trigger
- sensor.master_bedroom_multisensor_illuminance
binary_sensor:
- name: "Master Bedroom Naturally Lit"
unique_id: templatebinarysensor_masterbedroomnaturallylit
delay_on:
seconds: 3
delay_off:
seconds: 3
state: >
{{ states('sensor.master_bedroom_multisensor_illuminance') | float(default=0) > states('input_number.master_bedroom_light_level_trigger') | float(default=0) }}
icon: >
{% if states('sensor.master_bedroom_multisensor_illuminance') | float(default=0) > states('input_number.master_bedroom_light_level_trigger') | float(default=0) %}
mdi:weather-sunny
{% else %}
mdi:weather-sunny-off
{% endif %}
attributes:
illuminance: "{{ states('sensor.master_bedroom_multisensor_illuminance') | float(default=0) }}"
trigger: "{{ states('input_number.master_bedroom_light_level_trigger') | float(default=0) }}"
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id:
- input_number.nursery_light_level_trigger
- sensor.nursery_multisensor_illuminance
binary_sensor:
- name: "Nursery Naturally Lit"
unique_id: templatebinarysensor_nurserynaturallylit
delay_on:
seconds: 3
delay_off:
seconds: 3
state: >
{{ states('sensor.nursery_multisensor_illuminance') | float(default=0) > states('input_number.nursery_light_level_trigger') | float(default=0) }}
icon: >
{% if states('sensor.nursery_multisensor_illuminance') | float(default=0) > states('input_number.nursery_light_level_trigger') | float(default=0) %}
mdi:weather-sunny
{% else %}
mdi:weather-sunny-off
{% endif %}
attributes:
illuminance: "{{ states('sensor.nursery_multisensor_illuminance') | float(default=0) }}"
trigger: "{{ states('input_number.nursery_light_level_trigger') | float(default=0) }}"
input_number:
blue_room_light_level_trigger:
name: Blue Room Light Level Trigger
icon: mdi:brightness-auto
min: 0
max: 50000
mode: box
computer_area_light_level_trigger:
name: Computer Area Light Level Trigger
icon: mdi:brightness-auto
min: 0
max: 50000
mode: box
deck_light_level_trigger:
name: Deck Light Level Trigger
icon: mdi:brightness-auto
min: 0
max: 50000
mode: box
dining_room_light_level_trigger:
name: Dining Room Light Level Trigger
icon: mdi:brightness-auto
min: 0
max: 50000
mode: box
entryway_light_level_trigger:
name: Entryway Light Level Trigger
icon: mdi:brightness-auto
min: 0
max: 50000
mode: box
front_porch_light_level_trigger:
name: Front Porch Light Level Trigger
icon: mdi:brightness-auto
min: 0
max: 50000
mode: box
front_room_light_level_trigger:
name: Front Room Light Level Trigger
icon: mdi:brightness-auto
min: 0
max: 50000
mode: box
garage_overhead_light_level_trigger:
name: Garage Overhead Light Level Trigger
icon: mdi:brightness-auto
min: 0
max: 50000
mode: box
great_room_light_level_trigger:
name: Great Room Light Level Trigger
icon: mdi:brightness-auto
min: 0
max: 50000
mode: box
kitchen_light_level_trigger:
name: Kitchen Light Level Trigger
icon: mdi:brightness-auto
min: 0
max: 50000
mode: box
master_bedroom_light_level_trigger:
name: Master Bedroom Light Level Trigger
icon: mdi:brightness-auto
min: 0
max: 50000
mode: box
nursery_light_level_trigger:
name: Nursery Light Level Trigger
icon: mdi:brightness-auto
min: 0
max: 50000
mode: box
@@ -0,0 +1,25 @@
input_button:
restart_modem:
name: Restart Modem
icon: mdi:wan
restart_router:
name: Restart Router
icon: mdi:lan
restart_network:
name: Restart Network
icon: mdi:web
input_boolean:
restart_modem:
name: Restart Modem
icon: mdi:wan
restart_router:
name: Restart Router
icon: mdi:lan
restart_network:
name: Restart Network
icon: mdi:web
+1
View File
@@ -0,0 +1 @@
notify: !include_dir_list ../notifies
@@ -0,0 +1,8 @@
notify:
- platform: group
name: "Clints Everything"
services:
- service: dreambox
- service: dreamtablet
- service: dreamtablet02
- service: mobile_app_pixel_7
@@ -0,0 +1,10 @@
input_text:
gpt_prompt:
initial: ""
max: 255
name: GPT Prompt
input_button:
update_gpt_response:
name: Update GPT Response
icon: mdi:brain
@@ -0,0 +1,16 @@
automation:
description: ""
mode: single
trigger:
- platform: state
entity_id:
- sensor.hassio_mindsdb_response
attribute: response_text
condition: []
action:
- service: notify.mindsdb_responses
data:
message: >
"input":"{{ states('input_text.gpt_prompt') }}","output":"{{ state_attr('sensor.hassio_mindsdb_response','response_text')}}"
@@ -0,0 +1,127 @@
# TODO
# Update to account for new get_weather_forcats BS a
template:
- binary_sensor:
- name: Precipitation Likely Soon
unique_id: templatebinarysensor.precipitation_likely_soon
icon: mdi:weather-rainy
availability: "{{ states('sensor.openweathermap_hourly_forecast_precipitation_probability') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.openweathermap_hourly_forecast_precipitation_probability')|float(default=0) >= 50.0 }}"
- name: Precipitation Likely
unique_id: templatebinarysensor.precipitation_likely
icon: mdi:weather-rainy
availability: "{{ states('sensor.openweathermap_daily_forecast_precipitation_probability') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.openweathermap_daily_forecast_precipitation_probability')|float(default=0) >= 50.0 }}"
- trigger:
- platform: time_pattern
hours: /1
- platform: event
event_type: event_template_reloaded
id: "reload"
- platform: homeassistant
event: start
action:
- service: weather.get_forecasts
data:
type: daily
target:
entity_id: weather.openweathermap_daily
response_variable: daily
- service: weather.get_forecasts
data:
type: hourly
target:
entity_id: weather.openweathermap_hourly
response_variable: hourly
binary_sensor:
- name: "Impending Rain"
unique_id: templatebinarysensor.impending_rain
availability: "{{ states('weather.openweathermap_hourly') not in ['unkown', 'unavailable'] }}"
icon: mdi:weather-rainy
# This looks too far into the future. Cutting it down a bit
state: >-
{%- set totalprecipitation = 0 | float -%}
{%- set upcoming_precipitation = 0 | float -%}
{%- set ns = namespace() -%}
{%- set ns.totalprecipitation = 0 -%}
{%- for daypart in range(0, 8) -%}
{%- set precipitation = hourly['weather.openweathermap_hourly'].forecast[daypart].precipitation -%}
{%- set wind_speed = hourly['weather.openweathermap_hourly'].forecast[daypart].wind_speed -%}
{%- set precipitation_probability = hourly['weather.openweathermap_hourly'].forecast[daypart].precipitation_probability %}
{% if precipitation_probability > 0 -%}
{% if wind_speed > states('input_number.wind_speed_blowing_rain') |float(default=0) %}
{%- set upcoming_precipitation = precipitation * precipitation_probability -%}
{%- endif -%}
{%- endif -%}
{%- set ns.totalprecipitation = ns.totalprecipitation + upcoming_precipitation -%}
{%- endfor %}
{{ ns.totalprecipitation / 100 | float | round(0) > 0.99 }}
sensor:
- name: "Sprinkler: Total Expected Precipitation"
unique_id: "custom_sensor.sprinkler_total_expected_precipitation"
icon: mdi:weather-pouring
unit_of_measurement: mm
availability: "{{ states('weather.openweathermap_daily') not in ['unkown', 'unavailable'] }}"
state: >
{%- set totalprecipitation = 0 | float -%}
{%- set upcoming_precipitation = 0 | float -%}
{%- set ns = namespace() -%}
{%- set ns.totalprecipitation = 0 -%}
{%- for daypart in range(0, 8) -%}
{%- set precipitation = daily['weather.openweathermap_daily'].forecast[daypart].precipitation * 25.4 -%}
{%- set precipitation_probability = daily['weather.openweathermap_daily'].forecast[daypart].precipitation_probability / 100 %}
{% if precipitation_probability >0 -%}
{%- set upcoming_precipitation = precipitation * precipitation_probability -%}
{%- endif -%}
{%- set ns.totalprecipitation = ns.totalprecipitation + upcoming_precipitation -%}
{%- endfor %}
{{ ns.totalprecipitation | float | round(0) }}
- name: "Today's Low Temperature"
unique_id: templatesensor.templow_today
unit_of_measurement: °F
availability: "{{ states('weather.openweathermap_daily') not in ['unkown', 'unavailable'] }}"
state: "{{ daily['weather.openweathermap_daily'].forecast[0].templow }}"
- name: "Today's High Temperature"
unique_id: templatesensor.temphigh_today
unit_of_measurement: °F
availability: "{{ states('weather.openweathermap_daily') not in ['unkown', 'unavailable'] }}"
state: "{{ daily['weather.openweathermap_daily'].forecast[0].temperature}}"
- name: "Today's Chance of Precipitation"
unique_id: templatesensor.precip_chance_today
icon: mdi:cloud-percent
unit_of_measurement: '%'
availability: "{{ states('weather.openweathermap_daily') not in ['unkown', 'unavailable'] }}"
state: "{{ daily['weather.openweathermap_daily'].forecast[0].precipitation_probability}}"
- name: "Tomorrow's Low Temperature"
unique_id: templatesensor.templow_tomorrow
unit_of_measurement: °F
availability: "{{ states('weather.openweathermap_daily') not in ['unkown', 'unavailable'] }}"
state: "{{ daily['weather.openweathermap_daily'].forecast[1].templow}}"
- name: "Tomorrow's High Temperature"
unique_id: templatesensor.temphigh_tomorrow
unit_of_measurement: °F
availability: "{{ states('weather.openweathermap_daily') not in ['unkown', 'unavailable'] }}"
state: "{{ daily['weather.openweathermap_daily'].forecast[1].temperature}}"
- name: "Tomorrow's Chance of Precipitation"
unique_id: templatesensor.precip_chance_tomorrow
icon: mdi:cloud-percent
unit_of_measurement: '%'
availability: "{{ states('weather.openweathermap_daily') not in ['unkown', 'unavailable'] }}"
state: "{{ daily['weather.openweathermap_daily'].forecast[1].precipitation_probability}}"
+13
View File
@@ -0,0 +1,13 @@
lock:
- platform: template
unique_id: templatelock.patio_door
name: Patio Door
value_template: "{{ is_state('switch.shelly_sliding_glass_door', 'on') }}"
lock:
service: switch.turn_on
target:
entity_id: switch.shelly_sliding_glass_door
unlock:
service: switch.turn_off
target:
entity_id: switch.shelly_sliding_glass_door
@@ -0,0 +1,38 @@
# Toggle controlling the status of coordinate logging
input_boolean:
log_pixel_7_coordinates:
name: "Log Pixel 7 Coordinates"
icon: mdi:crosshairs-gps
# Coordinate log configuration
notify:
- name: Pixel 7 Coordinates
platform: file
filename: /config/custom_logs/pixel_7_coordinates.csv
timestamp: false
# Automation to handle the actual logging of coordinates
automation:
- alias: "Log Pixel 7 Coordinates"
id: 7e726150-6bd7-40c8-a990-13df987d0fca
trigger:
- platform: state
entity_id: input_boolean.log_pixel_7_coordinates
from: "off"
to: "on"
- platform: state
entity_id: device_tracker.pixel_7
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: input_boolean.log_pixel_7_coordinates
state: "on"
action:
- service: notify.pixel_7_coordinates
data:
message: "{{now().strftime('%Y-%m-%d')}}T{{now().strftime('%H:%M:%S.%f')}},{{states('device_tracker.pixel_7')}},{{state_attr('device_tracker.pixel_7','latitude')}},{{state_attr('device_tracker.pixel_7','longitude')}}"
@@ -0,0 +1,19 @@
sensor:
- platform: min_max
unique_id: sensor_lowest_xiaomi_device_battery
name: Lowest Xiaomi Plant Sensor Battery
type: min
entity_ids:
- sensor.plant_sensor_3eae_battery
- sensor.plant_sensor_3eb0_battery
- sensor.plant_sensor_cea4_battery
- platform: min_max
unique_id: sensor_lowest_ecowitt_device_battery
name: Lowest Ecowitt Battery
type: min
entity_ids:
- sensor.fineoffset_wh51_0d1e11_battery
- sensor.fineoffset_wh51_00f935_battery
- sensor.fineoffset_wh51_0ce593_battery
+84
View File
@@ -0,0 +1,84 @@
plant:
plant_sensor_cea4:
sensors:
moisture: sensor.plant_sensor_cea4_moisture
temperature: sensor.plant_sensor_cea4_temperature
conductivity: sensor.plant_sensor_cea4_conductivity
brightness: sensor.plant_sensor_cea4_illuminance
#battery: sensor.plant_sensor_cea4_battery
min_moisture: 10
max_moisture: 65
min_temperature: 30
min_brightness: 200
max_brightness: 300000
min_conductivity: 10
max_conductivity: 5700
plant_sensor_3eae:
sensors:
moisture: sensor.plant_sensor_3eae_moisture
temperature: sensor.plant_sensor_3eae_temperature
conductivity: sensor.plant_sensor_3eae_conductivity
brightness: sensor.plant_sensor_3eae_illuminance
#battery: sensor.plant_sensor_3eae_battery
min_moisture: 10
max_moisture: 65
min_temperature: 30
min_brightness: 200
max_brightness: 300000
min_conductivity: 10
max_conductivity: 5700
plant_sensor_3eb0:
sensors:
moisture: sensor.plant_sensor_3eb0_moisture
temperature: sensor.plant_sensor_3eb0_temperature
conductivity: sensor.plant_sensor_3eb0_conductivity
brightness: sensor.plant_sensor_3eb0_illuminance
#battery: sensor.plant_sensor_3eb0_battery
min_moisture: 10
max_moisture: 65
min_temperature: 30
min_brightness: 200
max_brightness: 300000
min_conductivity: 10
max_conductivity: 5700
fineoffset_wh51_00f935:
sensors:
moisture: sensor.fineoffset_wh51_00f935_moisture
temperature: sensor.outdoors_mean_temperature
battery: sensor.fineoffset_wh51_00f935_battery
brightness: sensor.outdoors_mean_illuminance
min_moisture: 15
max_moisture: 80
min_brightness: 200
max_brightness: 300000
min_temperature: -30
max_temperature: 120
fineoffset_wh51_0ce593:
sensors:
moisture: sensor.fineoffset_wh51_0ce593_moisture
temperature: sensor.outdoors_mean_temperature
battery: sensor.fineoffset_wh51_0ce593_battery
brightness: sensor.outdoors_mean_illuminance
min_moisture: 15
max_moisture: 80
min_brightness: 200
max_brightness: 300000
min_temperature: -30
max_temperature: 120
fineoffset_wh51_0d1e11:
sensors:
moisture: sensor.fineoffset_wh51_0d1e11_moisture
temperature: sensor.outdoors_mean_temperature
battery: sensor.fineoffset_wh51_0d1e11_battery
brightness: sensor.outdoors_mean_illuminance
min_moisture: 15
max_moisture: 80
min_brightness: 200
max_brightness: 300000
min_temperature: -30
max_temperature: 120
+14
View File
@@ -0,0 +1,14 @@
cover: !include_dir_list ../covers
group: !include ../../groups.yaml
switch: !include_dir_list ../switches
remote: !include_dir_list ../remotes
rest_command: !include_dir_merge_named ../rest_commands
scene: !include ../../scenes.yaml
#scene old: !include_dir_list ../../scenes
script: !include ../../scripts.yaml
#script old: !include_dir_named ../../scripts
script old: !include_dir_named ../../scripts
shell_command: !include_dir_merge_named ../shell_commands
tts: !include_dir_list ../tts
device_tracker: !include_dir_list ../device_trackers
alert: !include_dir_named ../alerts
@@ -0,0 +1,44 @@
# White Ziptie
mqtt:
sensor:
- name: "Timestamp"
device_class: timestamp
icon: mdi:clock-in
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Fineoffset-WH51/00f935/time"
force_update: true
entity_category: diagnostic
unique_id: Fineoffset-WH51-00f935-UTC
device:
identifiers: Fineoffset-WH51-00f935
name: Fineoffset-WH51-00f935
model: Fineoffset-WH51
manufacturer: rtl_433
- name: "Battery"
device_class: battery
unit_of_measurement: "%"
value_template: "{{ (float(value) * 99 + 1) | round(0) }}"
state_class: measurement
entity_category: diagnostic
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Fineoffset-WH51/00f935/battery_ok"
force_update: true
unique_id: Fineoffset-WH51-00f935-B
device:
identifiers: Fineoffset-WH51-00f935
name: Fineoffset-WH51-00f935
model: Fineoffset-WH51
manufacturer: rtl_433
- name: "Moisture"
device_class: moisture
unit_of_measurement: "%"
value_template: "{{ value|float }}"
state_class: measurement
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Fineoffset-WH51/00f935/moisture"
force_update: true
unique_id: Fineoffset-WH51-00f935-H
device:
identifiers: Fineoffset-WH51-00f935
name: Fineoffset-WH51-00f935
model: Fineoffset-WH51
manufacturer: rtl_433
@@ -0,0 +1,57 @@
mqtt:
sensor:
- name: "Timestamp"
device_class: timestamp
icon: mdi:clock-in
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Nexus-TH/1/69/time"
force_update: true
entity_category: diagnostic
unique_id: Nexus-TH-1-69-UTC
device:
identifiers: Nexus-TH-1-69
name: Nexus-TH-1-69
model: Nexus-TH
manufacturer: rtl_433
- name: "Battery"
device_class: battery
unit_of_measurement: "%"
value_template: "{{ (float(value) * 99 + 1) | round(0) }}"
state_class: measurement
entity_category: diagnostic
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Nexus-TH/1/69/battery_ok"
force_update: true
unique_id: Nexus-TH-1-69-B
device:
identifiers: Nexus-TH-1-69
name: Nexus-TH-1-69
model: Nexus-TH
manufacturer: rtl_433
- name: "Temperature"
device_class: temperature
unit_of_measurement: "°C"
value_template: "{{ value|float }}"
state_class: measurement
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Nexus-TH/1/69/temperature_C"
force_update: true
unique_id: Nexus-TH-1-69-T
device:
identifiers: Nexus-TH-1-69
name: Nexus-TH-1-69
model: Nexus-TH
manufacturer: rtl_433
- name: "Humidity"
device_class: humidity
unit_of_measurement: "%"
value_template: "{{ value|float }}"
state_class: measurement
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Nexus-TH/1/69/humidity"
force_update: true
unique_id: Nexus-TH-1-69-H
device:
identifiers: Nexus-TH-1-69
name: Nexus-TH-1-69
model: Nexus-TH
manufacturer: rtl_433
@@ -0,0 +1,44 @@
# Green Ziptie
mqtt:
sensor:
- name: "Timestamp"
device_class: timestamp
icon: mdi:clock-in
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Fineoffset-WH51/0ce593/time"
force_update: true
entity_category: diagnostic
unique_id: Fineoffset-WH51-0ce593-UTC
device:
identifiers: Fineoffset-WH51-0ce593
name: Fineoffset-WH51-0ce593
model: Fineoffset-WH51
manufacturer: rtl_433
- name: "Battery"
device_class: battery
unit_of_measurement: "%"
value_template: "{{ (float(value) * 99 + 1) | round(0) }}"
state_class: measurement
entity_category: diagnostic
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Fineoffset-WH51/0ce593/battery_ok"
force_update: true
unique_id: Fineoffset-WH51-0ce593-B
device:
identifiers: Fineoffset-WH51-0ce593
name: Fineoffset-WH51-0ce593
model: Fineoffset-WH51
manufacturer: rtl_433
- name: "Moisture"
device_class: moisture
unit_of_measurement: "%"
value_template: "{{ value|float }}"
state_class: measurement
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Fineoffset-WH51/0ce593/moisture"
force_update: true
unique_id: Fineoffset-WH51-0ce593-H
device:
identifiers: Fineoffset-WH51-0ce593
name: Fineoffset-WH51-0ce593
model: Fineoffset-WH51
manufacturer: rtl_433
@@ -0,0 +1,43 @@
mqtt:
sensor:
- name: "Timestamp"
device_class: timestamp
icon: mdi:clock-in
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Acurite-986/2F/42383/time"
force_update: true
entity_category: diagnostic
unique_id: Acurite-986-2F-42383-UTC
device:
identifiers: Acurite-986-2F-42383
name: Acurite-986-2F-42383
model: Acurite-986
manufacturer: rtl_433
- name: "Battery"
device_class: battery
unit_of_measurement: "%"
value_template: "{{ (float(value) * 99 + 1) | round(0) }}"
state_class: measurement
entity_category: diagnostic
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Acurite-986/2F/42383/battery_ok"
force_update: true
unique_id: Acurite-986-2F-42383-B
device:
identifiers: Acurite-986-2F-42383
name: Acurite-986-2F-42383
model: Acurite-986
manufacturer: rtl_433
- name: "Temperature"
device_class: temperature
unit_of_measurement: "°C"
value_template: "{{ value|float }}"
state_class: measurement
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Acurite-986/2F/42383/temperature_C"
force_update: true
unique_id: Acurite-986-2F-42383-T
device:
identifiers: Acurite-986-2F-42383
name: Acurite-986-2F-42383
model: Acurite-986
manufacturer: rtl_433
@@ -0,0 +1,43 @@
mqtt:
sensor:
- name: "Timestamp"
device_class: timestamp
icon: mdi:clock-in
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Acurite-986/1R/48226/time"
force_update: true
entity_category: diagnostic
unique_id: Acurite-986-1R-48226-UTC
device:
identifiers: Acurite-986-1R-48226
name: Acurite-986-1R-48226
model: Acurite-986
manufacturer: rtl_433
- name: "Battery"
device_class: battery
unit_of_measurement: "%"
value_template: "{{ (float(value) * 99 + 1) | round(0) }}"
state_class: measurement
entity_category: diagnostic
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Acurite-986/1R/48226/battery_ok"
force_update: true
unique_id: Acurite-986-1R-48226-B
device:
identifiers: Acurite-986-1R-48226
name: Acurite-986-1R-48226
model: Acurite-986
manufacturer: rtl_433
- name: "Temperature"
device_class: temperature
unit_of_measurement: "°C"
value_template: "{{ value|float }}"
state_class: measurement
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Acurite-986/1R/48226/temperature_C"
force_update: true
unique_id: Acurite-986-1R-48226-H
device:
identifiers: Acurite-986-1R-48226
name: Acurite-986-1R-48226
model: Acurite-986
manufacturer: rtl_433
@@ -0,0 +1,73 @@
mqtt:
sensor:
- name: "Timestamp"
device_class: timestamp
icon: mdi:clock-in
state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/time"
force_update: true
entity_category: diagnostic
unique_id: EcoWitt-WH40-21917-UTC
device:
identifiers: EcoWitt-WH40-21917
name: EcoWitt-WH40-21917
model: EcoWitt-WH40
manufacturer: rtl_433
# - name: "Data"
# value_template: "{{ value }}"
# state_class: measurement
# entity_category: diagnostic
# state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/data"
# force_update: true
# unique_id: EcoWitt-WH40-21917-D
# device:
# identifiers: EcoWitt-WH40-21917
# name: EcoWitt-WH40-21917
# model: EcoWitt-WH40
# manufacturer: rtl_433
- name: "Precipitation"
device_class: precipitation
unit_of_measurement: "mm"
value_template: "{{ value|float }}"
state_class: measurement
state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/rain_mm"
force_update: true
unique_id: EcoWitt-WH40-21917-H
device:
identifiers: EcoWitt-WH40-21917
name: EcoWitt-WH40-21917
model: EcoWitt-WH40
manufacturer: rtl_433
- name: "Battery"
device_class: battery
unit_of_measurement: "%"
value_template: "{{ (float(value) / 1.5) * 100 | round(0) }}"
state_class: measurement
entity_category: diagnostic
state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/battery_V"
force_update: true
unique_id: EcoWitt-WH40-21917-V
device:
identifiers: EcoWitt-WH40-21917
name: EcoWitt-WH40-21917
model: EcoWitt-WH40
manufacturer: rtl_433
binary_sensor:
- name: "Battery OK"
value_template: "{{ value|int }}"
device_class: problem
entity_category: diagnostic
state_topic: "rtl_433/9b13b3f4-rtl433/devices/EcoWitt-WH40/21917/battery_ok"
payload_on: "1"
payload_off: "0"
force_update: true
unique_id: EcoWitt-WH40-21917-Battery-OK
device:
identifiers: EcoWitt-WH40-21917
name: EcoWitt-WH40-21917
model: EcoWitt-WH40
manufacturer: rtl_433
@@ -0,0 +1,57 @@
mqtt:
sensor:
- name: "Timestamp"
device_class: timestamp
icon: mdi:clock-in
state_topic: "rtl_433/9b13b3f4-rtl433/devices/LaCrosse-TX141THBv2/0/54/time"
force_update: true
entity_category: diagnostic
unique_id: LaCrosse-TX141THBv2-0-54-UTC
device:
identifiers: LaCrosse-TX141THBv2-0-54
name: LaCrosse-TX141THBv2-0-54
model: LaCrosse-TX141THBv2
manufacturer: rtl_433
- name: "Battery"
device_class: battery
unit_of_measurement: "%"
value_template: "{{ (float(value) * 99 + 1) | round(0) }}"
state_class: measurement
entity_category: diagnostic
state_topic: "rtl_433/9b13b3f4-rtl433/devices/LaCrosse-TX141THBv2/0/54/battery_ok"
force_update: true
unique_id: LaCrosse-TX141THBv2-0-54-B
device:
identifiers: LaCrosse-TX141THBv2-0-54
name: LaCrosse-TX141THBv2-0-54
model: LaCrosse-TX141THBv2
manufacturer: rtl_433
- name: "Temperature"
device_class: temperature
unit_of_measurement: "°C"
value_template: "{{ value|float }}"
state_class: measurement
state_topic: "rtl_433/9b13b3f4-rtl433/devices/LaCrosse-TX141THBv2/0/54/temperature_C"
force_update: true
unique_id: LaCrosse-TX141THBv2-0-54-T
device:
identifiers: LaCrosse-TX141THBv2-0-54
name: LaCrosse-TX141THBv2-0-54
model: LaCrosse-TX141THBv2
manufacturer: rtl_433
- name: "Humidity"
device_class: humidity
unit_of_measurement: "%"
value_template: "{{ value|float }}"
state_class: measurement
state_topic: "rtl_433/9b13b3f4-rtl433/devices/LaCrosse-TX141THBv2/0/54/humidity"
force_update: true
unique_id: LaCrosse-TX141THBv2-0-54-H
device:
identifiers: LaCrosse-TX141THBv2-0-54
name: LaCrosse-TX141THBv2-0-54
model: LaCrosse-TX141THBv2
manufacturer: rtl_433
@@ -0,0 +1,44 @@
# Yellow Ziptie
mqtt:
sensor:
- name: "Timestamp"
device_class: timestamp
icon: mdi:clock-in
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Fineoffset-WH51/0d1e11/time"
force_update: true
entity_category: diagnostic
unique_id: Fineoffset-WH51-0d1e11-UTC
device:
identifiers: Fineoffset-WH51-0d1e11
name: Fineoffset-WH51-0d1e11
model: Fineoffset-WH51
manufacturer: rtl_433
- name: "Battery"
device_class: battery
unit_of_measurement: "%"
value_template: "{{ (float(value) * 99 + 1) | round(0) }}"
state_class: measurement
entity_category: diagnostic
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Fineoffset-WH51/0d1e11/battery_ok"
force_update: true
unique_id: Fineoffset-WH51-0d1e11-B
device:
identifiers: Fineoffset-WH51-0d1e11
name: Fineoffset-WH51-0d1e11
model: Fineoffset-WH51
manufacturer: rtl_433
- name: "Moisture"
device_class: moisture
unit_of_measurement: "%"
value_template: "{{ value|float }}"
state_class: measurement
state_topic: "rtl_433/9b13b3f4-rtl433/devices/Fineoffset-WH51/0d1e11/moisture"
force_update: true
unique_id: Fineoffset-WH51-0d1e11-H
device:
identifiers: Fineoffset-WH51-0d1e11
name: Fineoffset-WH51-0d1e11
model: Fineoffset-WH51
manufacturer: rtl_433
+188
View File
@@ -0,0 +1,188 @@
switch:
- platform: template
switches:
front_yard_station:
friendly_name: Front Yard Station
unique_id: template_switch.front_yard_station
value_template: "{{ is_state('binary_sensor.front_yard_station_running', 'on') }}"
icon_template: mdi:sprinkler
turn_on:
service: opensprinkler.run
data_template:
entity_id: binary_sensor.front_yard_station_running
# Run seconds uses the input_number below.
run_seconds: "{{ ((states('input_number.front_yard_station_minutes') | float) * 60) | int }}"
turn_off:
service: opensprinkler.stop
data:
entity_id: binary_sensor.front_yard_station_running
east_side_station:
friendly_name: East Side Station
unique_id: template_switch.east_side_station
value_template: "{{ is_state('binary_sensor.east_side_station_running', 'on') }}"
icon_template: mdi:sprinkler
turn_on:
service: opensprinkler.run
data_template:
entity_id: binary_sensor.east_side_station_running
# Run seconds uses the input_number below.
run_seconds: "{{ ((states('input_number.east_side_station_minutes') | float) * 60) | int }}"
turn_off:
service: opensprinkler.stop
data:
entity_id: binary_sensor.east_side_station_running
back_yard_station:
friendly_name: Back Yard Station
unique_id: template_switch.back_yard_station
value_template: "{{ is_state('binary_sensor.back_yard_station_running', 'on') }}"
icon_template: mdi:sprinkler
turn_on:
service: opensprinkler.run
data_template:
entity_id: binary_sensor.back_yard_station_running
# Run seconds uses the input_number below.
run_seconds: "{{ ((states('input_number.back_yard_station_minutes') | float) * 60) | int }}"
turn_off:
service: opensprinkler.stop
data:
entity_id: binary_sensor.back_yard_station_running
west_side_station:
friendly_name: West Side Station
unique_id: template_switch.west_side_station
value_template: "{{ is_state('binary_sensor.west_side_station_running', 'on') }}"
icon_template: mdi:sprinkler
turn_on:
service: opensprinkler.run
data_template:
entity_id: binary_sensor.west_side_station_running
# Run seconds uses the input_number below.
run_seconds: "{{ ((states('input_number.west_side_station_minutes') | float) * 60) | int }}"
turn_off:
service: opensprinkler.stop
data:
entity_id: binary_sensor.west_side_station_running
input_number:
front_yard_station_minutes:
name: Front Yard Station Minutes
icon: mdi:sprinkler-variant
min: 0
max: 60
step: 1
east_side_station_minutes:
name: East Side Station Minutes
icon: mdi:sprinkler-variant
min: 0
max: 60
step: 1
back_yard_station_minutes:
name: Back Yard Station Minutes
icon: mdi:sprinkler-variant
min: 0
max: 60
step: 1
west_side_station_minutes:
name: West Side Station Minutes
icon: mdi:sprinkler-variant
min: 0
max: 60
step: 1
input_button:
# PTZ Controls
5_minute_test:
name: Run 5 Minute Test
icon: mdi:sprinkler
front_yard_fun:
name: Run Front Yard Fun
icon: mdi:sprinkler
back_yard_fun:
name: Run Back Yard Fun
icon: mdi:sprinkler
evening_program:
name: Run Evening Program
icon: mdi:sprinkler
morning_program:
name: Run Morning Program
icon: mdi:sprinkler
full_run_program:
name: Run Full run Program
icon: mdi:sprinkler
automatic_run_program:
name: Run Automatic Run Program
icon: mdi:sprinkler
stop_all_sprinklers:
name: Stop All Sprinklers
icon: mdi:sprinkler
automation:
- id: automation_opensprinkler_program_buttons
alias: OpenSprinkler Program Buttons
mode: queued
trigger:
- id: 5_minute_test_program_enabled
platform: state
entity_id: input_button.5_minute_test
- id: front_yard_fun_program_enabled
platform: state
entity_id: input_button.front_yard_fun
- id: back_yard_fun_program_enabled
platform: state
entity_id: input_button.back_yard_fun
- id: evening_program_enabled
platform: state
entity_id: input_button.evening_program
- id: morning_program_enabled
platform: state
entity_id: input_button.morning_program
- id: full_run_program_enabled
platform: state
entity_id: input_button.full_run
- id: automatic_run_program_enabled
platform: state
entity_id: input_button.automatic_run_program
condition: []
action:
- service: opensprinkler.run
data:
entity_id: "switch.{{ trigger.id }}"
- delay: '00:00:01'
- id: automation_opensprinkler_stop_all_sprinklers
alias: OpenSprinkler Stop All Sprinklers
mode: queued
trigger:
- id: opensprinkler_enabled
platform: state
entity_id: input_button.stop_all_sprinklers
condition: []
action:
- service: opensprinkler.stop
data:
entity_id: "switch.{{ trigger.id }}"
- delay: '00:00:01'
+30
View File
@@ -0,0 +1,30 @@
# Disabling the Stream component to see if that makes or breaks anything
# Re-enabling this, to see if it causes a large delay
# Disabling because it still fucking sucks
#stream:
# Re-enabling to test with BlueIris
#stream:
# Re-enabling to test with Frigate RTMP
# Still don't like it, and there isn't really any benefit
#stream:
# Re-enabling it, yet again because the Synology and Amcrest components work really well with WebRTC
# Without this enabled, the videos are live but w/o audio and they don't work as media sources
# Enabling this to see if I can then leverage HA to stream them to devices
# Still doesn't do what I want it to
#stream:
#More Frigate testing
#stream:
# What do I want to end up with?
stream:
# ll_hls: true
# # # part_duration: 0.25
# # # segment_duration: 3
# part_duration: 0.76
# segment_duration: 6
+34
View File
@@ -0,0 +1,34 @@
template:
- trigger:
- platform: time
at: '00:00:00'
- platform: event
event_type: event_template_reloaded
- platform: homeassistant
event: start
sensor:
- name: 'Two Hours Before Sunrise'
unique_id: 'sensor_two_hours_before_sunrise'
state: "{{ state_attr('sun.sun', 'next_rising') | as_datetime - timedelta(hours = 2) }}"
device_class: timestamp
- name: Sunrise
unique_id: sensor_sunrise
state: "{{ state_attr('sun.sun', 'next_rising') }}"
device_class: timestamp
- name: 'Two Hours After Sunrise'
unique_id: 'sensor_two_hours_after_sunrise'
state: "{{ state_attr('sun.sun', 'next_rising') | as_datetime + timedelta(hours = 2) }}"
device_class: timestamp
- name: 'Two Hours Before Sunset'
unique_id: 'sensor_two_hours_before_sunset'
state: "{{ state_attr('sun.sun', 'next_setting') | as_datetime - timedelta(hours = 2) }}"
device_class: timestamp
- name: Sunset
unique_id: sensor_sunset
state: "{{ state_attr('sun.sun', 'next_setting') }}"
device_class: timestamp
- name: 'Two Hours After Sunset'
unique_id: 'sensor_two_hours_after_sunset'
state: "{{ state_attr('sun.sun', 'next_setting') | as_datetime + timedelta(hours = 2) }}"
device_class: timestamp
@@ -0,0 +1,257 @@
input_number:
warmer_outside_difference_trigger:
name: Warmer Outside Difference Trigger
icon: mdi:sun-snowflake-variant
min: 0
max: 20
step: 1
cooler_outside_difference_trigger:
name: Cooler Outside Difference Trigger
icon: mdi:sun-snowflake-variant
min: 0
max: 20
step: 1
template:
- binary_sensor:
# This is ON when it is warmer outside than it is inside, as defined by input_number.warmer_outside_difference_trigger
- name: Warmer Outside
unique_id: templatebinarysensor.warmer_outside
icon: mdi:sun-snowflake-variant
device_class: heat
delay_on:
seconds: 15
delay_off:
seconds: 15
availability: "{{ (states('sensor.upstairs_mean_temperature') not in ['unkown', 'unavailable']) and (states('sensor.outdoors_mean_temperature') not in ['unkown', 'unavailable']) }}"
state: "{{ iif(states('sensor.outdoors_mean_temperature') | float(default=0) - states('input_number.warmer_outside_difference_trigger') | float(default=0) > states('sensor.upstairs_mean_temperature') | float(default=0) ) }}"
attributes:
indoors: "{{ states('sensor.upstairs_mean_temperature') | float(default=0) }}"
outdoors: "{{ states('sensor.outdoors_mean_temperature') | float(default=0) }}"
trigger: "{{ states('input_number.warmer_outside_difference_trigger') | float(default=0) }}"
# This is ON when it is cooler outside than it is inside, as defined by input_number.cooler_outside_difference_trigger
- name: Cooler Outside
unique_id: templatebinarysensor.cooler_outside
icon: mdi:sun-snowflake-variant
device_class: cold
delay_on:
seconds: 15
delay_off:
seconds: 15
availability: "{{ (states('sensor.upstairs_mean_temperature') not in ['unkown', 'unavailable']) and (states('sensor.outdoors_mean_temperature') not in ['unkown', 'unavailable']) }}"
state: "{{ iif(states('sensor.outdoors_mean_temperature') | float(default=0) + states('input_number.cooler_outside_difference_trigger') | float(default=0) < states('sensor.upstairs_mean_temperature') | float(default=0) ) }}"
attributes:
indoors: "{{ states('sensor.upstairs_mean_temperature') | float(default=0)}}"
outdoors: "{{ states('sensor.outdoors_mean_temperature') | float(default=0)}}"
trigger: "{{ states('input_number.cooler_outside_difference_trigger') | float(default=0) }}"
# This is ON when the temperature outside is hotter than the temp_high configured as part of the climate platform
- name: Too Hot Outside
unique_id: templatebinarysensor.too_hot_outside
icon: mdi:weather-sunny
device_class: heat
delay_on:
seconds: 15
delay_off:
seconds: 15
availability: "{{ (states('climate.thermostat') not in ['unkown', 'unavailable']) and (states('sensor.outdoors_mean_temperature') not in ['unkown', 'unavailable']) }}"
state: "{{states('sensor.outdoors_mean_temperature') | float(default=0) > states('sensor.hvac_target_temp_high') | float(default=0) - (states('input_number.warmer_outside_difference_trigger') | float(default=0) / 2) }}"
attributes:
outdoor_temp: "{{ states('sensor.outdoors_mean_temperature') | float(default=0)}}"
target_temp_high: "{{ state_attr('climate.thermostat','target_temp_high') | float(default=0)}}"
# This is ON when the thermostat is hotter than the temp_high configured as part of the climate platform
- name: Too Hot Inside
unique_id: templatebinarysensor.too_hot_inside
icon: mdi:weather-sunny
device_class: heat
availability: "{{ (states('sensor.hvac_target_temp_high') not in ['unkown', 'unavailable']) and (states('sensor.upstairs_mean_temperature') not in ['unkown', 'unavailable']) }}"
state: "{{states('sensor.upstairs_mean_temperature') | float(default=0) > states('sensor.hvac_target_temp_high') | float(default=(state_attr('climate.thermostat','temperature') |float(default=0))) - 1.0 }}"
attributes:
upstairs_mean_temp: "{{ states('sensor.upstairs_mean_temperature') | float(default=0)}}"
target_temp_high: "{{ states('sensor.hvac_target_temp_high') | float(default=0)}}"
target_temperature: "{{ state_attr('climate.thermostat','temperature') |float(default=0) }}"
# This is ON when the temperature outside is colder than the temp_low configured as part of the climate platform
- name: Too Cold Outside
unique_id: templatebinarysensor.too_cold_outside
icon: mdi:snowflake
device_class: cold
delay_on:
seconds: 15
delay_off:
seconds: 15
availability: "{{ (states('climate.thermostat') not in ['unkown', 'unavailable']) and (states('sensor.outdoors_mean_temperature') not in ['unkown', 'unavailable']) }}"
state: "{{states('sensor.outdoors_mean_temperature') | float(default=0) < states('sensor.hvac_target_temp_low') | float(default=0) - (states('input_number.cooler_outside_difference_trigger') | float(default=0) ) }}"
attributes:
outdoor_temp: "{{ states('sensor.outdoors_mean_temperature') | float(default=0)}}"
target_temp_low: "{{ state_attr('climate.thermostat','target_temp_low') | float(default=0)}}"
# This is ON when the thermostat is hotter than the temp_high configured as part of the climate platform
- name: Too Cold Inside
unique_id: templatebinarysensor.too_cold_inside
icon: mdi:snowflake
device_class: cold
availability: "{{ (states('sensor.hvac_target_temp_low') not in ['unkown', 'unavailable']) and (states('sensor.upstairs_mean_temperature') not in ['unkown', 'unavailable']) }}"
state: "{{states('sensor.upstairs_mean_temperature') | float(default=0) < states('sensor.hvac_target_temp_low') | float(default=(state_attr('climate.thermostat','temperature') |float(default=0))) + 1.0 }}"
attributes:
upstairs_mean_temp: "{{ states('sensor.upstairs_mean_temperature') | float(default=0)}}"
target_temp_low: "{{ states('sensor.hvac_target_temp_low') | float(default=0)}}"
target_temperature: "{{ state_attr('climate.thermostat','temperature') |float(default=0) }}"
# This is ON when either the garage door or the exterior garage door is open while the inner garage door is open
- name: Inner Garage Door Open to Outside
unique_id: templatebinarysensor.inner_garage_door_open_to_outside
device_class: door
availability: "{{ (states('binary_sensor.inner_garage_door') not in ['unkown', 'unavailable']) and (states('binary_sensor.garage_door') not in ['unkown', 'unavailable']) and (states('binary_sensor.outer_garage_door') not in ['unkown', 'unavailable']) }}"
state: >-
{% if is_state('binary_sensor.inner_garage_door', 'on') %}
{% if is_state('binary_sensor.garage_door', 'on') or is_state('binary_sensor.outer_garage_door', 'on') %}
{{'true'}}
{% else %}
{{'false'}}
{% endif %}
{% else %}
{{'false'}}
{% endif %}
# This is ON when an exterior door or window has been left open for more than 10 minutes
- name: Something Open
unique_id: templatebinarysensor.something_open
icon: mdi:door-open
device_class: opening
state: "{{ iif(is_state('binary_sensor.patio_door_contact', 'on') or is_state('group.my_exterior_windows', 'on') or is_state('binary_sensor.front_door_contact', 'on') or is_state('binary_sensor.inner_garage_door_open_to_outside', 'on')) }}"
- name: Something Open Too Warm or Cold
unique_id: templatebinarysensor.something_open_too_warm_or_cold
device_class: problem
delay_on:
minutes: 2
state: >-
{% if is_state('binary_sensor.something_open','on') %}
{% if is_state('binary_sensor.too_cold_inside','on') and is_state('binary_sensor.cooler_outside', 'on') and is_state('binary_sensor.getting_warmer_outside', 'off') %}
{{'true'}}
{% elif is_state('binary_sensor.too_hot_inside','on') and is_state('binary_sensor.warmer_outside', 'on') and is_state('binary_sensor.getting_cooler_outside', 'off') %}
{{'true'}}
{% else %}
{{'false'}}
{% endif %}
{% else %}
{{'false'}}
{% endif %}
attributes:
outdoor_temp: "{{ states('sensor.outdoors_mean_temperature') | float(default=0)}}"
upstairs_mean_temp: "{{ states('sensor.upstairs_mean_temperature') | float(default=0)}}"
target_temp_high: "{{ state_attr('climate.thermostat','target_temp_high') | float(default=0)}}"
target_temp_low: "{{ state_attr('climate.thermostat','target_temp_low') | float(default=0)}}"
getting_warmer: "{{ states('binary_sensor.getting_warmer_outside') }}"
too_hot_inside: "{{ states('binary_sensor.too_hot_inside') }}"
warmer_outside: "{{ states('binary_sensor.warmer_outside') }}"
too_hot_outside: "{{ states('binary_sensor.too_hot_outside') }}"
getting_cooler: "{{ states('binary_sensor.getting_cooler_outside') }}"
too_cold_inside: "{{ states('binary_sensor.too_cold_inside') }}"
cooler_outside: "{{ states('binary_sensor.cooler_outside') }}"
too_cold_outside: "{{ states('binary_sensor.too_cold_outside') }}"
- name: Need to Open Something Too Warm or Cold
unique_id: templatebinarysensor.need_to_open_something_too_warm_or_cold
device_class: problem
# delay_on:
# minutes: 5
state: >-
{% if is_state('binary_sensor.something_open','off') %}
{% if is_state('binary_sensor.too_cold_inside','off') and is_state('binary_sensor.too_hot_inside','off') and is_state('binary_sensor.too_cold_outside','off') and is_state('binary_sensor.too_hot_outside','off') %}
{{'true'}}
{% else %}
{{'false'}}
{% endif %}
{% else %}
{{'false'}}
{% endif %}
attributes:
outdoor_temp: "{{ states('sensor.outdoors_mean_temperature') | float(default=0)}}"
upstairs_mean_temp: "{{ states('sensor.upstairs_mean_temperature') | float(default=0)}}"
target_temp_high: "{{ state_attr('climate.thermostat','target_temp_high') | float(default=0)}}"
target_temp_low: "{{ state_attr('climate.thermostat','target_temp_low') | float(default=0)}}"
getting_warmer: "{{ states('binary_sensor.getting_warmer_outside') }}"
too_hot_inside: "{{ states('binary_sensor.too_hot_inside') }}"
warmer_outside: "{{ states('binary_sensor.warmer_outside') }}"
too_hot_outside: "{{ states('binary_sensor.too_hot_outside') }}"
getting_cooler: "{{ states('binary_sensor.getting_cooler_outside') }}"
too_cold_inside: "{{ states('binary_sensor.too_cold_inside') }}"
cooler_outside: "{{ states('binary_sensor.cooler_outside') }}"
too_cold_outside: "{{ states('binary_sensor.too_cold_outside') }}"
- sensor:
- name: Outdoor Temperature Gradient
unique_id: templatesensor.outdoor_temperature_gradient
state: "{{ (state_attr('binary_sensor.getting_warmer_outside','gradient') | float(default=0) * 10000) | round(2)}}"
availability: "{{ (states('binary_sensor.getting_warmer_outside') not in ['unkown', 'unavailable']) }}"
icon: mdi:sun-thermometer
state_class: measurement
unit_of_measurement: p
attributes:
outdoor_temp: "{{ states('sensor.outdoors_mean_temperature') | float(default=0)}}"
target_temp_high: "{{ state_attr('climate.thermostat','target_temp_high') | float(default=0)}}"
target_temp_low: "{{ state_attr('climate.thermostat','target_temp_low') | float(default=0)}}"
getting_warmer: "{{ states('binary_sensor.getting_warmer_outside') }}"
warmer_outside: "{{ states('binary_sensor.warmer_outside') }}"
too_hot_outside: "{{ states('binary_sensor.too_hot_outside') }}"
getting_cooler: "{{ states('binary_sensor.getting_cooler_outside') }}"
cooler_outside: "{{ states('binary_sensor.cooler_outside') }}"
too_cold_outside: "{{ states('binary_sensor.too_cold_outside') }}"
- name: HVAC Target Temp Low
unique_id: templatesensor_hvac_target_temp_low
state: "{{state_attr('climate.thermostat','target_temp_low')}}"
availability: "{{ (states('climate.thermostat') not in ['unkown', 'unavailable']) }}"
device_class: temperature
unit_of_measurement: "°F"
attributes:
hvac_action: "{{state_attr('climate.thermostat','hvac_action')}}"
preset_mode: "{{state_attr('climate.thermostat','preset_mode')}}"
climate_mode_mode: "{{state_attr('climate.thermostat','climate_mode')}}"
- name: HVAC Target Temp High
unique_id: templatesensor_hvac_target_temp_high
state: "{{state_attr('climate.thermostat','target_temp_high')}}"
availability: "{{ (states('climate.thermostat') not in ['unkown', 'unavailable']) }}"
device_class: temperature
unit_of_measurement: "°F"
attributes:
hvac_action: "{{state_attr('climate.thermostat','hvac_action')}}"
preset_mode: "{{state_attr('climate.thermostat','preset_mode')}}"
climate_mode_mode: "{{state_attr('climate.thermostat','climate_mode')}}"
- name: HVAC Target Temperature
unique_id: templatesensor_hvac_target_temperature
state: "{{state_attr('climate.thermostat','temperature')}}"
availability: "{{ (states('climate.thermostat') not in ['unkown', 'unavailable']) }}"
device_class: temperature
unit_of_measurement: "°F"
attributes:
hvac_action: "{{state_attr('climate.thermostat','hvac_action')}}"
preset_mode: "{{state_attr('climate.thermostat','preset_mode')}}"
climate_mode_mode: "{{state_attr('climate.thermostat','climate_mode')}}"
- name: HVAC Current Temperature
unique_id: templatesensor_hvac_current_temperature
icon: mdi:fan-clock
state: "{{state_attr('climate.thermostat','current_temperature')}}"
availability: "{{ (states('climate.thermostat') not in ['unkown', 'unavailable']) }}"
device_class: temperature
unit_of_measurement: "°F"
attributes:
hvac_action: "{{state_attr('climate.thermostat','hvac_action')}}"
preset_mode: "{{state_attr('climate.thermostat','preset_mode')}}"
climate_mode_mode: "{{state_attr('climate.thermostat','climate_mode')}}"
- name: HVAC Fan Min On Time
unique_id: templatesensor_hvac_fan_min_on_time
state: "{{state_attr('climate.thermostat','fan_min_on_time')}}"
availability: "{{ (states('climate.thermostat') not in ['unkown', 'unavailable']) }}"
device_class: duration
unit_of_measurement: min
@@ -0,0 +1,225 @@
utility_meter:
hourly_energy:
unique_id: utility_meter_hourly_energy
name: Total Hourly Energy
source: sensor.pm_grid_kwh
cycle: hourly
tariffs:
- Non-Summer
- Summer Peak
- Summer Non-Peak
daily_energy:
unique_id: utility_meter_daily_energy
name: Total Daily Energy
source: sensor.pm_grid_kwh
cycle: daily
tariffs:
- Non-Summer
- Summer Peak
- Summer Non-Peak
weekly_energy:
unique_id: utility_meter_weekly_energy
name: Total Weekly Energy
source: sensor.pm_grid_kwh
cycle: weekly
tariffs:
- Non-Summer
- Summer Peak
- Summer Non-Peak
monthly_energy:
unique_id: utility_meter_monthly_energy
name: Total Monthly Energy
source: sensor.pm_grid_kwh
cycle: monthly
offset:
days: 17
tariffs:
- Non-Summer
- Summer Peak
- Summer Non-Peak
template:
- sensor:
- unique_id: templatebinarysensor.hourly_energy_non_summer_cost
name: Hourly Energy Non-Summer Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.hourly_energy_non_summer') not in ['unkown', 'unavailable'] and states('sensor.nonsummer_per_kwh') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.hourly_energy_non_summer')|float(default=0) * states('sensor.nonsummer_per_kwh')|float(default=0) }}"
- unique_id: templatebinarysensor.hourly_energy_summer_peak_cost
name: Hourly Energy Summer Peak Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.hourly_energy_summer_peak') not in ['unkown', 'unavailable'] and states('sensor.summerpeak_per_kwh') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.hourly_energy_summer_peak')|float(default=0) * states('sensor.summerpeak_per_kwh')|float(default=0) }}"
- unique_id: templatebinarysensor.hourly_energy_summer_non_peak_cost
name: Hourly Energy Summer Non-Peak Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.hourly_energy_summer_non_peak') not in ['unkown', 'unavailable'] and states('sensor.summernonpeak_per_kwh') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.hourly_energy_summer_non_peak')|float(default=0) * states('sensor.summernonpeak_per_kwh')|float(default=0) }}"
- unique_id: templatebinarysensor.daily_energy_non_summer_cost
name: Daily Energy Non-Summer Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.daily_energy_non_summer') not in ['unkown', 'unavailable'] and states('sensor.nonsummer_per_kwh') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.daily_energy_non_summer')|float(default=0) * states('sensor.nonsummer_per_kwh')|float(default=0) }}"
- unique_id: templatebinarysensor.daily_energy_summer_peak_cost
name: Daily Energy Summer Peak Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.daily_energy_summer_peak') not in ['unkown', 'unavailable'] and states('sensor.summerpeak_per_kwh') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.daily_energy_summer_peak')|float(default=0) * states('sensor.summerpeak_per_kwh')|float(default=0) }}"
- unique_id: templatebinarysensor.daily_energy_summer_non_peak_cost
name: Daily Energy Summer Non-Peak Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.daily_energy_summer_non_peak') not in ['unkown', 'unavailable'] and states('sensor.summernonpeak_per_kwh') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.daily_energy_summer_non_peak')|float(default=0) * states('sensor.summernonpeak_per_kwh')|float(default=0) }}"
- unique_id: templatebinarysensor.weekly_energy_non_summer_cost
name: Weekly Energy Non-Summer Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.weekly_energy_non_summer') not in ['unkown', 'unavailable'] and states('sensor.nonsummer_per_kwh') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.weekly_energy_non_summer')|float(default=0) * states('sensor.nonsummer_per_kwh')|float(default=0) }}"
- unique_id: templatebinarysensor.weekly_energy_summer_peak_cost
name: Weekly Energy Summer Peak Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.weekly_energy_summer_peak') not in ['unkown', 'unavailable'] and states('sensor.summerpeak_per_kwh') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.weekly_energy_summer_peak')|float(default=0) * states('sensor.summerpeak_per_kwh')|float(default=0) }}"
- unique_id: templatebinarysensor.weekly_energy_summer_non_peak_cost
name: Weekly Energy Summer Non-Peak Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.weekly_energy_summer_non_peak') not in ['unkown', 'unavailable'] and states('sensor.summernonpeak_per_kwh') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.weekly_energy_summer_non_peak')|float(default=0) * states('sensor.summernonpeak_per_kwh')|float(default=0) }}"
- unique_id: templatebinarysensor.monthly_energy_non_summer_cost
name: Monthly Energy Non-Summer Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.monthly_energy_non_summer') not in ['unkown', 'unavailable'] and states('sensor.nonsummer_per_kwh') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.monthly_energy_non_summer')|float(default=0) * states('sensor.nonsummer_per_kwh')|float(default=0) }}"
- unique_id: templatebinarysensor.monthly_energy_summer_peak_cost
name: Monthly Energy Summer Peak Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.monthly_energy_summer_peak') not in ['unkown', 'unavailable'] and states('sensor.summerpeak_per_kwh') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.monthly_energy_summer_peak')|float(default=0) * states('sensor.summerpeak_per_kwh')|float(default=0) }}"
- unique_id: templatebinarysensor.monthly_energy_summer_non_peak_cost
name: Monthly Energy Summer Non-Peak Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.monthly_energy_summer_non_peak') not in ['unkown', 'unavailable'] and states('sensor.summernonpeak_per_kwh') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.monthly_energy_summer_non_peak')|float(default=0) * states('sensor.summernonpeak_per_kwh')|float(default=0) }}"
- unique_id: templatebinarysensor.hourly_energy_total_cost
name: Hourly Energy Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.hourly_energy_non_summer_total_cost') not in ['unkown', 'unavailable'] and states('sensor.hourly_energy_summer_non_peak_total_cost') not in ['unkown', 'unavailable'] and states('sensor.hourly_energy_summer_peak_total_cost') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.hourly_energy_non_summer_total_cost')|float(default=0) + states('sensor.hourly_energy_summer_non_peak_total_cost')|float(default=0) + states('sensor.hourly_energy_summer_peak_total_cost')|float(default=0) }}"
- unique_id: templatebinarysensor.daily_energy_total_cost
name: Daily Energy Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.daily_energy_non_summer_total_cost') not in ['unkown', 'unavailable'] and states('sensor.daily_energy_summer_non_peak_total_cost') not in ['unkown', 'unavailable'] and states('sensor.daily_energy_summer_peak_total_cost') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.daily_energy_non_summer_total_cost')|float(default=0) + states('sensor.daily_energy_summer_non_peak_total_cost')|float(default=0) + states('sensor.daily_energy_summer_peak_total_cost')|float(default=0) }}"
- unique_id: templatebinarysensor.weekly_energy_total_cost
name: Weekly Energy Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.weekly_energy_non_summer_total_cost') not in ['unkown', 'unavailable'] and states('sensor.weekly_energy_summer_non_peak_total_cost') not in ['unkown', 'unavailable'] and states('sensor.weekly_energy_summer_peak_total_cost') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.weekly_energy_non_summer_total_cost')|float(default=0) + states('sensor.weekly_energy_summer_non_peak_total_cost')|float(default=0) + states('sensor.weekly_energy_summer_peak_total_cost')|float(default=0) }}"
- unique_id: templatebinarysensor.monthly_energy_total_cost
name: Monthly Energy Total Cost
device_class: monetary
state_class: total
unit_of_measurement: '$'
icon: mdi:currency-usd
availability: "{{ states('sensor.monthly_energy_non_summer_total_cost') not in ['unkown', 'unavailable'] and states('sensor.monthly_energy_summer_non_peak_total_cost') not in ['unkown', 'unavailable'] and states('sensor.monthly_energy_summer_peak_total_cost') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.monthly_energy_non_summer_total_cost')|float(default=0) + states('sensor.monthly_energy_summer_non_peak_total_cost')|float(default=0) + states('sensor.monthly_energy_summer_peak_total_cost')|float(default=0) }}"
- unique_id: templatebinarysensor.hourly_energy_total
name: Hourly Energy Total
device_class: energy
state_class: total
unit_of_measurement: kWh
icon: mdi:flash
availability: "{{ states('sensor.hourly_energy_non_summer') not in ['unkown', 'unavailable'] and states('sensor.hourly_energy_summer_non_peak') not in ['unkown', 'unavailable'] and states('sensor.hourly_energy_summer_peak') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.hourly_energy_non_summer')|float(default=0) + states('sensor.hourly_energy_summer_non_peak')|float(default=0) + states('sensor.hourly_energy_summer_peak')|float(default=0) }}"
- unique_id: templatebinarysensor.daily_energy_total
name: Daily Energy Total
device_class: energy
state_class: total
unit_of_measurement: kWh
icon: mdi:flash
availability: "{{ states('sensor.daily_energy_non_summer') not in ['unkown', 'unavailable'] and states('sensor.daily_energy_summer_non_peak') not in ['unkown', 'unavailable'] and states('sensor.daily_energy_summer_peak') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.daily_energy_non_summer')|float(default=0) + states('sensor.daily_energy_summer_non_peak')|float(default=0) + states('sensor.daily_energy_summer_peak')|float(default=0) }}"
- unique_id: templatebinarysensor.weekly_energy_total
name: Weekly Energy Total
device_class: energy
state_class: total
unit_of_measurement: kWh
icon: mdi:flash
availability: "{{ states('sensor.weekly_energy_non_summer') not in ['unkown', 'unavailable'] and states('sensor.weekly_energy_summer_non_peak') not in ['unkown', 'unavailable'] and states('sensor.weekly_energy_summer_peak') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.weekly_energy_non_summer')|float(default=0) + states('sensor.weekly_energy_summer_non_peak')|float(default=0) + states('sensor.weekly_energy_summer_peak')|float(default=0) }}"
- unique_id: templatebinarysensor.monthly_energy_total
name: Monthly Energy Total
device_class: energy
state_class: total
unit_of_measurement: kWh
icon: mdi:flash
availability: "{{ states('sensor.monthly_energy_non_summer') not in ['unkown', 'unavailable'] and states('sensor.monthly_energy_summer_non_peak') not in ['unkown', 'unavailable'] and states('sensor.monthly_energy_summer_peak') not in ['unkown', 'unavailable'] }}"
state: "{{ states('sensor.monthly_energy_non_summer')|float(default=0) + states('sensor.monthly_energy_summer_non_peak')|float(default=0) + states('sensor.monthly_energy_summer_peak')|float(default=0) }}"
@@ -0,0 +1,114 @@
automation:
- id: automation_update_energy_tariff
alias: Update Energy Tariff
# Summer rates run from June 1st through September 30
# Summer peak rate starts at 14:00 and ends at 19:00
trigger:
- platform: state
entity_id: sensor.energy_tariff
to:
- Non-Summer
- Summer Peak
- Summer Non-Peak
- platform: homeassistant
event: start
- platform: event
event_type: automation_reloaded
action:
- service: select.select_option
target:
entity_id:
- select.hourly_energy
- select.daily_energy
- select.weekly_energy
- select.monthly_energy
# - select.basement_and_laundry_lights_and_plugs_hourly
# - select.basement_and_laundry_lights_and_plugs_daily
# - select.basement_and_laundry_lights_and_plugs_weekly
# - select.basement_and_laundry_lights_and_plugs_monthly
# - select.basement_bedroom_and_furnace_room_lights_hourly
# - select.basement_bedroom_and_furnace_room_lights_daily
# - select.basement_bedroom_and_furnace_room_lights_weekly
# - select.basement_bedroom_and_furnace_room_lights_monthly
# - select.basement_plugs_hourly
# - select.basement_plugs_daily
# - select.basement_plugs_weekly
# - select.basement_plugs_monthly
# - select.basement_stairs_and_lights_hourly
# - select.basement_stairs_and_lights_daily
# - select.basement_stairs_and_lights_weekly
# - select.basement_stairs_and_lights_monthly
# - select.bathroom_plug_hourly
# - select.bathroom_plug_daily
# - select.bathroom_plug_weekly
# - select.bathroom_plug_monthly
# - select.dishwasher_hourly
# - select.dishwasher_daily
# - select.dishwasher_weekly
# - select.dishwasher_monthly
# - select.dryer_hourly
# - select.dryer_daily
# - select.dryer_weekly
# - select.dryer_monthly
# - select.front_room_plugs_hourly
# - select.front_room_plugs_daily
# - select.front_room_plugs_weekly
# - select.front_room_plugs_monthly
# - select.furnace_hourly
# - select.furnace_daily
# - select.furnace_weekly
# - select.furnace_monthly
# - select.garage_and_outside_plugs_hourly
# - select.garage_and_outside_plugs_daily
# - select.garage_and_outside_plugs_weekly
# - select.garage_and_outside_plugs_monthly
# - select.garage_outside_and_front_garage_lights_hourly
# - select.garage_outside_and_front_garage_lights_daily
# - select.garage_outside_and_front_garage_lights_weekly
# - select.garage_outside_and_front_garage_lights_monthly
# - select.heat_pump_hourly
# - select.heat_pump_daily
# - select.heat_pump_weekly
# - select.heat_pump_monthly
# - select.kitchen_1_hourly
# - select.kitchen_1_daily
# - select.kitchen_1_weekly
# - select.kitchen_1_monthly
# - select.kitchen_2_hourly
# - select.kitchen_2_daily
# - select.kitchen_2_weekly
# - select.kitchen_2_monthly
# - select.laundry_plug_hourly
# - select.laundry_plug_daily
# - select.laundry_plug_weekly
# - select.laundry_plug_monthly
# - select.master_suite_hourly
# - select.master_suite_daily
# - select.master_suite_weekly
# - select.master_suite_monthly
# - select.microwave_plug_hourly
# - select.microwave_plug_daily
# - select.microwave_plug_weekly
# - select.microwave_plug_monthly
# - select.nursery_dining_kitchen_lights_hourly
# - select.nursery_dining_kitchen_lights_daily
# - select.nursery_dining_kitchen_lights_weekly
# - select.nursery_dining_kitchen_lights_monthly
# - select.stove_hourly
# - select.stove_daily
# - select.stove_weekly
# - select.stove_monthly
# - select.sump_pump_plug_hourly
# - select.sump_pump_plug_daily
# - select.sump_pump_plug_weekly
# - select.sump_pump_plug_monthly
# - select.well_hourly
# - select.well_daily
# - select.well_weekly
# - select.well_monthly
data:
option: "{{ states('sensor.energy_tariff') }}"
+50
View File
@@ -0,0 +1,50 @@
input_select:
ytube_music_player_source:
name: Source
icon: mdi:music-box-multiple
options: # don't change
- "Playlist Radio"
- "Playlist"
ytube_music_player_speakers:
name: Speakers
icon: mdi:speaker
options: # don't change
- "loading"
ytube_music_player_playlist:
name: Playlist
icon: mdi:playlist-music
options: # don't change
- "loading"
ytube_music_player_playmode:
name: Playmode
icon: mdi:playlist-music
options: ## don't change
- "Shuffle"
- "Random"
- "Shuffle Random"
- "Direct"
# Optional, defaults to true
input_boolean:
ytube_music_player_playcontinuous:
initial: true
name: "Countinuous playback"
ytube_music_player_show_playlist:
icon: mdi:playlist-music
name: "Show Playlist"
ytube_music_player_show_lyrics:
icon: mdi:card-text
name: "Show Lyrics"
ytube_music_player_show_speakers:
icon: mdi:speaker-multiple
name: "Show Speakers"
ytube_music_player_show_details:
icon: mdi:card-account-details
name: "Show Details"
+53
View File
@@ -0,0 +1,53 @@
sensor:
- platform: min_max
unique_id: sensor_lowest_window_device_battery
name: Lowest Window Battery
type: min
entity_ids:
- sensor.nursery_window_battery
- sensor.computer_area_window_battery
- sensor.entryway_window_battery
- sensor.front_room_window_battery
- sensor.master_bedroom_window_battery
- platform: min_max
unique_id: sensor_lowest_thermostat_device_battery
name: Lowest Thermostat Battery
type: min
entity_ids:
- sensor.blue_room_thermostat_battery
- sensor.front_room_thermostat_battery
- sensor.furnace_room_thermostat_battery
- sensor.mancave_thermostat_battery
- sensor.master_bathroom_thermostat_battery
- sensor.utility_room_thermostat_battery
- platform: min_max
unique_id: sensor_lowest_door_device_battery
name: Lowest Door Battery
type: min
entity_ids:
- sensor.basement_door_battery
- sensor.blue_room_door_battery
- sensor.mancave_door_battery
- sensor.utility_room_door_battery
- sensor.front_door_battery
- sensor.master_bathroom_door_battery
- sensor.master_bedroom_closet_door_battery
- sensor.master_bedroom_door_battery
- sensor.master_suite_door_battery
- sensor.nursery_closet_door_battery
- sensor.patio_door_battery
- sensor.storage_room_door_battery
- sensor.pantry_door_battery
- platform: min_max
unique_id: sensor_lowest_zigbee_device_battery
name: Lowest Zigbee Device Battery
type: min
entity_ids:
# - sensor.cube_two_battery
# - sensor.first_cube_battery
- sensor.dishwasher_door_battery
- sensor.tumble_dryer_door_battery
- sensor.washing_machine_door_battery
+6
View File
@@ -0,0 +1,6 @@
zone:
name: Home
latitude: !secret home_lat
longitude: !secret home_long
radius: 40
icon: mdi:account-multiple
+14
View File
@@ -0,0 +1,14 @@
sensor:
- platform: min_max
unique_id: sensor_lowest_zwave_device_battery
name: Lowest ZWave Device Battery
type: min
entity_ids:
- sensor.front_room_motion_sensor_battery_level
- sensor.kitchen_motion_sensor_battery_level
- sensor.master_bedroom_multisensor_battery_level
- sensor.nursery_multisensor_battery_level
- sensor.computer_area_multisensor_battery_level
- sensor.great_room_multisensor_battery_level
- sensor.garage_multisensor_battery_level
- sensor.kitchen_multisensor_battery_level
+53
View File
@@ -0,0 +1,53 @@
template:
- sensor:
- name: "Alive ZWave Devices"
unique_id: template_sensor_alive_zwave
state: >-
{{ expand(integration_entities('Z-Wave JS') )| selectattr("entity_id", "search", "node_status") |
selectattr('state', 'in', 'alive') |
map(attribute='entity_id')| list | count | int(default=0)}}
- name: "Dead ZWave Devices"
unique_id: template_sensor_failed_zwave
state: >-
{% if states('sensor.alive_zwave_devices')|int(default=0) > 0 %}
{{ expand(integration_entities('Z-Wave JS') )| selectattr("entity_id", "search", "node_status") |
selectattr('state', 'in', 'dead') |
map(attribute='entity_id')| list | count | int(default=0)}}
{% else %}
0
{% endif %}
automation:
- id: automation_alert_failed_zwave_nodes
alias: Ping Dead Zwave Nodes
description: 'Iterates through a list of dead ZWave Nodes and calls a service to press the Ping button'
mode: single
max_exceeded: silent
trigger:
- platform: state
entity_id: sensor.dead_zwave_devices
condition:
- condition: template
value_template: '{{ states("sensor.dead_zwave_devices")|int(default=0) >0 }}'
action:
- repeat:
while: '{{ states("sensor.dead_zwave_devices")|int(default=0) > 0 }}'
sequence:
- service: button.press
target:
entity_id: >-
{% set list =
expand(integration_entities('Z-Wave JS') )| selectattr('entity_id', 'search', 'node_status') |
selectattr('state', 'in', ['dead', 'unavailable', 'unknown']) |
map(attribute='entity_id')| list %}
{% set ns = namespace(buttons=[]) %}
{% for d in list %}
{% set ns.buttons = ns.buttons +
['button.' ~ (states[d].object_id.split('_node')[0]) ~ '_ping'] %}
{% endfor %}
{{ns.buttons}}
- delay:
seconds: 1