mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
why keep track any more?
This commit is contained in:
@@ -34,59 +34,48 @@ input_number:
|
||||
step: 0.1
|
||||
mode: box
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
|
||||
keurig_on:
|
||||
friendly_name: 'Keurig On'
|
||||
value_template: "{{ states('sensor.shelly_keurig_w') | float(default=0) < states('input_number.keurig_on') | float(default=0) }}"
|
||||
template:
|
||||
- binary_sensor:
|
||||
- unique_id: templatebinarysensor.keurig
|
||||
delay_on: 0:00:50
|
||||
delay_off: 0:00:30
|
||||
default_entity_id: binary_sensor.keurig
|
||||
icon: mdi:coffee-maker
|
||||
attributes:
|
||||
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)}}'
|
||||
name: Keurig
|
||||
state: '{{ states("sensor.shelly_keurig_w") | float(default=0) > states("input_number.keurig_on") | float(default=0) }}'
|
||||
|
||||
keurig_warming_water:
|
||||
friendly_name: 'Keurig Warming Water'
|
||||
value_template: "{{ states('sensor.shelly_keurig_w') | float(default=0) > states('input_number.keurig_warming_water') | float(default=0) }}"
|
||||
delay_off: "00:00:20"
|
||||
- unique_id: b1f4d3e2-3c4b-4f5a-9f6b-7e8d9a0b1c2d
|
||||
name: Keurig Warming Water
|
||||
delay_off: 0:00:20
|
||||
default_entity_id: binary_sensor.keurig_warming_water
|
||||
state: '{{ states("sensor.shelly_keurig_w") | float(default=0) > states("input_number.keurig_warming_water") | float(default=0) }}'
|
||||
|
||||
keurig_brewing:
|
||||
friendly_name: 'Keurig Brewing'
|
||||
value_template: "{{ states('sensor.shelly_keurig_w') | float(default=0) > states('input_number.keurig_brewing') | float(default=0) }}"
|
||||
- unique_id: 58a3805b-aee7-4c1f-9299-6b5e31e3cc73
|
||||
name: Keurig Brewing
|
||||
default_entity_id: binary_sensor.keurig_brewing
|
||||
state: '{{ states("sensor.shelly_keurig_w") | float(default=0) > states("input_number.keurig_brewing") | float(default=0) }}'
|
||||
|
||||
keurig_pouring:
|
||||
friendly_name: 'Keurig Pouring'
|
||||
value_template: "{{ states('sensor.shelly_keurig_w') | float(default=0) > states('input_number.keurig_pouring') | float(default=0) }}"
|
||||
- unique_id: 4a7e80f6-8880-4c4e-b251-825aceb3db07
|
||||
name: Keurig Pouring
|
||||
default_entity_id: binary_sensor.keurig_pouring
|
||||
state: '{{ states("sensor.shelly_keurig_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)}}"
|
||||
- unique_id: templatebinarysensor.keurig_carafe
|
||||
delay_on: 0:04:00
|
||||
delay_off: 0:00:40
|
||||
default_entity_id: binary_sensor.keurig_carafe
|
||||
icon: mdi:coffee-maker
|
||||
attributes:
|
||||
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)}}'
|
||||
name: Keurig Carafe
|
||||
state: '{{ states("sensor.shelly_keurig_w") | float(default=0) > states("input_number.keurig_carafe")
|
||||
| float(default=0) }}'
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
binary_sensor:
|
||||
- platform: generic_hygrostat
|
||||
name: Master Bathroom Hygrostat
|
||||
sensor: sensor.bathroom_multisensor_relative_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_multisensor_relative_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.
|
||||
@@ -1,69 +1,67 @@
|
||||
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:
|
||||
action: 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:
|
||||
action: opensprinkler.stop
|
||||
data:
|
||||
entity_id: binary_sensor.front_yard_station_running
|
||||
template:
|
||||
- switch:
|
||||
- unique_id: template_switch.front_yard_station
|
||||
turn_on:
|
||||
- action: opensprinkler.run
|
||||
data_template:
|
||||
entity_id: binary_sensor.front_yard_station_running
|
||||
run_seconds: "{{ ((states('input_number.front_yard_station_minutes') | float) * 60) | int }}"
|
||||
turn_off:
|
||||
- action: opensprinkler.stop
|
||||
data:
|
||||
entity_id: binary_sensor.front_yard_station_running
|
||||
default_entity_id: switch.front_yard_station
|
||||
icon: mdi:sprinkler
|
||||
name: Front Yard Station
|
||||
state: "{{ is_state('binary_sensor.front_yard_station_running', 'on') }}"
|
||||
|
||||
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:
|
||||
action: 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:
|
||||
action: opensprinkler.stop
|
||||
data:
|
||||
entity_id: binary_sensor.east_side_station_running
|
||||
- unique_id: template_switch.east_side_station
|
||||
default_entity_id: switch.east_side_station
|
||||
name: East Side Station
|
||||
state: "{{ is_state('binary_sensor.east_side_station_running', 'on') }}"
|
||||
icon: mdi:sprinkler
|
||||
turn_on:
|
||||
action: 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:
|
||||
action: 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:
|
||||
action: 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:
|
||||
action: opensprinkler.stop
|
||||
data:
|
||||
entity_id: binary_sensor.back_yard_station_running
|
||||
- unique_id: template_switch.back_yard_station
|
||||
default_entity_id: switch.back_yard_station
|
||||
name: Back Yard Station
|
||||
state: "{{ is_state('binary_sensor.back_yard_station_running', 'on') }}"
|
||||
icon: mdi:sprinkler
|
||||
turn_on:
|
||||
action: 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:
|
||||
action: 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:
|
||||
action: 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:
|
||||
action: opensprinkler.stop
|
||||
data:
|
||||
entity_id: binary_sensor.west_side_station_running
|
||||
- unique_id: template_switch.west_side_station
|
||||
default_entity_id: switch.west_side_station
|
||||
name: West Side Station
|
||||
state: "{{ is_state('binary_sensor.west_side_station_running', 'on') }}"
|
||||
icon: mdi:sprinkler
|
||||
turn_on:
|
||||
action: 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:
|
||||
action: opensprinkler.stop
|
||||
data:
|
||||
entity_id: binary_sensor.west_side_station_running
|
||||
|
||||
input_number:
|
||||
front_yard_station_minutes:
|
||||
|
||||
@@ -0,0 +1,643 @@
|
||||
template:
|
||||
- binary_sensor:
|
||||
- unique_id: templatebinarysensor.pixel_7_connected_to_traverse
|
||||
default_entity_id: binary_sensor.pixel_7_connected_to_traverse
|
||||
icon: mdi:cellphone-key
|
||||
name: Pixel 7 Connected to Traverse
|
||||
state: '{{ ''30:C3:D9:B0:CA:E4 (Chevrolet MyLink)'' in state_attr(''sensor.pixel_7_bluetooth_connection'',''connected_paired_devices'') }}'
|
||||
|
||||
- unique_id: templatebinarysensor.humidity_too_low
|
||||
default_entity_id: binary_sensor.humidity_too_low
|
||||
name: Humidity Too Low
|
||||
icon: mdi:water-minus
|
||||
state: "{{ states('sensor.upstairs_min_humidity') | float(default=0) < states('input_number.humidity_too_low')|float(default=0) or states('sensor.downstairs_min_humidity') | float(default=0) < states('input_number.humidity_too_low')|float(default=0) }}"
|
||||
attributes:
|
||||
upstairs_area: "{{ state_attr('sensor.upstairs_min_humidity', 'min_entity_id') }}"
|
||||
upstairs_value: "{{ states('sensor.upstairs_min_humidity') }}"
|
||||
downstairs_area: "{{ state_attr('sensor.downstairs_min_humidity', 'min_entity_id') }}"
|
||||
downstairs_value: "{{ states('sensor.downstairs_min_humidity') }}"
|
||||
|
||||
- unique_id: templatebinarysensor.humidity_too_high
|
||||
default_entity_id: binary_sensor.humidity_too_high
|
||||
name: Humidity Too High
|
||||
icon: mdi:water-plus
|
||||
state: "{{ states('sensor.upstairs_max_humidity') | float(default=0) > states('input_number.humidity_too_high')|float(default=0) or states('sensor.downstairs_max_humidity') | float(default=0) > states('input_number.humidity_too_high')|float(default=0) }}"
|
||||
attributes:
|
||||
upstairs_area: "{{ state_attr('sensor.upstairs_max_humidity', 'max_entity_id') }}"
|
||||
upstairs_value: "{{ states('sensor.upstairs_max_humidity') }}"
|
||||
downstairs_area: "{{ state_attr('sensor.downstairs_max_humidity', 'max_entity_id') }}"
|
||||
downstairs_value: "{{ states('sensor.downstairs_max_humidity') }}"
|
||||
|
||||
- unique_id: templatebinarysensor.temperature_too_low
|
||||
default_entity_id: binary_sensor.temperature_too_low
|
||||
name: Temperature Too Low
|
||||
icon: mdi:thermometer-chevron-down
|
||||
state: "{{ states('sensor.upstairs_min_temperature') | float(default=0) < states('input_number.temperature_too_low')|float(default=0) or states('sensor.downstairs_min_temperature') | float(default=0) < states('input_number.temperature_too_low')|float(default=0) }}"
|
||||
attributes:
|
||||
upstairs_area: "{{ state_attr('sensor.upstairs_min_temperature', 'min_entity_id') }}"
|
||||
upstairs_value: "{{ states('sensor.upstairs_min_temperature') }}"
|
||||
downstairs_area: "{{ state_attr('sensor.downstairs_min_temperature', 'min_entity_id') }}"
|
||||
downstairs_value: "{{ states('sensor.downstairs_min_temperature') }}"
|
||||
|
||||
- unique_id: templatebinarysensor.temperature_too_high
|
||||
default_entity_id: binary_sensor.temperature_too_high
|
||||
name: Temperature Too High
|
||||
icon: mdi:thermometer-chevron-up
|
||||
state: "{{ states('sensor.upstairs_max_temperature') | float(default=0) > states('input_number.temperature_too_high')|float(default=0) or states('sensor.downstairs_max_temperature') | float(default=0) > states('input_number.temperature_too_high')|float(default=0) }}"
|
||||
attributes:
|
||||
upstairs_area: "{{ state_attr('sensor.upstairs_max_temperature', 'max_entity_id') }}"
|
||||
upstairs_value: "{{ states('sensor.upstairs_max_temperature') }}"
|
||||
downstairs_area: "{{ state_attr('sensor.downstairs_max_temperature', 'max_entity_id') }}"
|
||||
downstairs_value: "{{ states('sensor.downstairs_max_temperature') }}"
|
||||
|
||||
- unique_id: templatebinarysensor.humidity_problem
|
||||
default_entity_id: binary_sensor.humidity_problem
|
||||
name: Humidity Problem
|
||||
icon: mdi:water-alert
|
||||
state: "{{ is_state('binary_sensor.humidity_too_low','on') or is_state('binary_sensor.humidity_too_high','on') }}"
|
||||
|
||||
- unique_id: templatebinarysensor.kids_possible
|
||||
default_entity_id: binary_sensor.kids_possible
|
||||
name: Kids Possible
|
||||
icon: mdi:human-male-female-child
|
||||
state: "{{ is_state('binary_sensor.have_custody','on') or is_state('binary_sensor.even_week','on') or is_state('input_boolean.kristy_home','on') or is_state('input_boolean.ebin_home','on') or is_state('input_select.weaver_kids','Home') or is_state('input_select.podein_kids','Home') }}"
|
||||
|
||||
- unique_id: templatebinarysensor.kitchen_fridge_too_warm
|
||||
default_entity_id: binary_sensor.kitchen_fridge_too_warm
|
||||
name: Kitchen Fridge Too Warm
|
||||
state: "{{ states('sensor.kitchen_fridge_thermostat_temperature')|int(default=0) > states('input_number.kitchen_fridge_alert')|int(default=0) }}"
|
||||
delay_on: "00:30:00"
|
||||
icon: >
|
||||
{% if states('sensor.kitchen_fridge_thermostat_temperature')|int(default=0) > states('input_number.kitchen_fridge_alert')|int(default=0) %}
|
||||
mdi:fridge-variant-alert
|
||||
{% else %}
|
||||
mdi:fridge-variant
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.kitchen_freezer_too_warm
|
||||
default_entity_id: binary_sensor.kitchen_freezer_too_warm
|
||||
name: Kitchen Freezer Too Warm
|
||||
state: "{{ states('sensor.kitchen_freezer_thermostat_temperature')|int(default=0) > states('input_number.kitchen_freezer_alert')|int(default=0) }}"
|
||||
delay_on: "00:30:00"
|
||||
icon: >
|
||||
{% if states('sensor.kitchen_freezer_thermostat_temperature')|int(default=0) > states('input_number.kitchen_freezer_alert')|int(default=0) %}
|
||||
mdi:fridge-variant-alert
|
||||
{% else %}
|
||||
mdi:fridge-variant
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.kitchen_fridge_or_freezer_too_warm
|
||||
default_entity_id: binary_sensor.kitchen_fridge_or_freezer_too_warm
|
||||
name: Kitchen Fridge or Freezer Too Warm
|
||||
state: "{{ states('sensor.kitchen_fridge_thermostat_temperature')|int(default=0) > states('input_number.kitchen_fridge_alert')|int(default=0) or states('sensor.kitchen_freezer_thermostat_temperature')|int(default=0) > states('input_number.kitchen_freezer_alert')|int(default=0) }}"
|
||||
delay_on: "00:30:00"
|
||||
icon: >
|
||||
{% if states('sensor.kitchen_fridge_thermostat_temperature')|int(default=0) > states('input_number.kitchen_fridge_alert')|int(default=0) or states('sensor.kitchen_freezer_thermostat_temperature')|int(default=0) > states('input_number.kitchen_freezer_alert')|int(default=0) %}
|
||||
mdi:fridge-variant-alert
|
||||
{% else %}
|
||||
mdi:fridge-variant
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.master_bed_left_occupied
|
||||
default_entity_id: binary_sensor.master_bed_left_occupied
|
||||
name: Master Bedroom Left Occupied
|
||||
icon: mdi:bed-king
|
||||
state: "{{ is_state('binary_sensor.bed_presence_c175a4_bed_occupied_left','on') }}"
|
||||
|
||||
- unique_id: templatebinarysensor.master_bed_right_occupied
|
||||
default_entity_id: binary_sensor.master_bed_right_occupied
|
||||
name: Master Bedroom Right Occupied
|
||||
icon: mdi:bed-king
|
||||
state: "{{ is_state('binary_sensor.bed_presence_c175a4_bed_occupied_right','on') }}"
|
||||
|
||||
- unique_id: templatebinarysensor.bathroom_getting_humid
|
||||
default_entity_id: binary_sensor.bathroom_getting_humid
|
||||
name: Bathroom Getting Humid
|
||||
delay_off:
|
||||
minutes: 5
|
||||
state: "{{ states('sensor.bathroom_multisensor_relative_humidity') | float(default=0) - states('sensor.upstairs_mean_humidity') | float(default=100) > 10 }}"
|
||||
icon: >
|
||||
{% if states('sensor.bathroom_multisensor_relative_humidity') | float(default=0) - states('sensor.upstairs_mean_humidity') | float(default=100) > 10 %}
|
||||
mdi:water-percent
|
||||
{% else %}
|
||||
mdi:water-off
|
||||
{% endif %}
|
||||
attributes:
|
||||
room_humidity: "{{ states('sensor.bathroom_multisensor_relative_humidity') | float(default=0) }}"
|
||||
mean_humidity: "{{ states('sensor.upstairs_mean_humidity') | float(default=0) }}"
|
||||
difference: "{{ states('sensor.bathroom_multisensor_relative_humidity') | float(default=0) - states('sensor.upstairs_mean_humidity') | float(default=0) }}"
|
||||
|
||||
- unique_id: templatebinarysensor.utility_room_getting_humid
|
||||
default_entity_id: binary_sensor.utility_room_getting_humid
|
||||
name: Utility Room Getting Humid
|
||||
delay_off:
|
||||
minutes: 5
|
||||
#state: "{{ is_state('binary_sensor.trend_utility_humidity','on') or states('sensor.utility_room_thermostat_humidity') | int(default=0) - states('sensor.computer_area_multisensor_humidity') | int(default=100) > 5}}"
|
||||
state: "{{ states('sensor.utility_room_thermostat_humidity') | float(default=0) - states('sensor.downstairs_mean_humidity') | float(default=100) > 10 }}"
|
||||
icon: >
|
||||
{% if states('sensor.utility_room_thermostat_humidity') | float(default=0) - states('sensor.downstairs_mean_humidity') | float(default=100) > 10 %}
|
||||
mdi:water-percent
|
||||
{% else %}
|
||||
mdi:water-off
|
||||
{% endif %}
|
||||
attributes:
|
||||
room_humidity: "{{ states('sensor.utility_room_thermostat_humidity') | float(default=0) }}"
|
||||
mean_humidity: "{{ states('sensor.downstairs_mean_humidity') | float(default=0) }}"
|
||||
difference: "{{ states('sensor.utility_room_thermostat_humidity') | float(default=0) - states('sensor.downstairs_mean_humidity') | float(default=0) }}"
|
||||
|
||||
- unique_id: templatebinarysensor.work_hours
|
||||
default_entity_id: binary_sensor.work_hours
|
||||
name: Work Hours
|
||||
state: "{{ is_state('binary_sensor.is_workday', 'on') and is_state('binary_sensor.business_hours', 'on') }}"
|
||||
icon: mdi:briefcase
|
||||
|
||||
- unique_id: binary-sensor-stove
|
||||
default_entity_id: binary_sensor.stove
|
||||
name: Stove
|
||||
delay_off:
|
||||
seconds: 120
|
||||
state: "{{ states('sensor.pm_stove_w') | float(default=0) > states('input_number.stove_on') | float(default=0) }}"
|
||||
icon: mdi:stove
|
||||
attributes:
|
||||
model_number: "WFE505W0JS3"
|
||||
serial_number: "RB4659869"
|
||||
power: "{{ states('sensor.pm_stove_w') | float(default=0)}}"
|
||||
# oven_temperature: "{{ iif(is_state('sensor.oven_temperature', 'unavailable'), 'unavailable', states('sensor.oven_temperature') | float(default=0)) }}"
|
||||
|
||||
- unique_id: binary-sensor-microwave
|
||||
default_entity_id: binary_sensor.microwave
|
||||
name: Microwave
|
||||
state: "{{ states('sensor.pm_microwave_plug_w') | float(default=0) > states('input_number.microwave_on') | float(default=0) }}"
|
||||
icon: mdi:microwave
|
||||
attributes:
|
||||
model_number: "testmodel"
|
||||
serial_number: "testserial"
|
||||
power: "{{ states('sensor.pm_microwave_plug_w') | float(default=0)}}"
|
||||
|
||||
- unique_id: binary-sensor-furnace
|
||||
default_entity_id: binary_sensor.furnace
|
||||
name: Furnace
|
||||
state: "{{ states('sensor.pm_furnace_w') | float(default=0) > states('input_number.furnace_on') | float(default=0) }}"
|
||||
icon: mdi:radiator
|
||||
attributes:
|
||||
model_number: "testmodel"
|
||||
serial_number: "testserial"
|
||||
power: "{{ states('sensor.pm_furnace_w') | float(default=0)}}"
|
||||
|
||||
- unique_id: binary-sensor-heat-pump
|
||||
default_entity_id: binary_sensor.heat_pump
|
||||
name: Heat Pump
|
||||
state: "{{ states('sensor.pm_heat_pump_w') | float(default=0) > states('input_number.heat_pump_on') | float(default=0) }}"
|
||||
icon: mdi:air-filter
|
||||
attributes:
|
||||
model_number: "testmodel"
|
||||
serial_number: "testserial"
|
||||
power: "{{ states('sensor.pm_heat_pump_w') | float(default=0)}}"
|
||||
|
||||
- unique_id: binary-sensor-sump-pump
|
||||
default_entity_id: binary_sensor.sump_pump
|
||||
name: Sump Pump
|
||||
state: "{{ states('sensor.pm_sump_pump_plug_w') | float(default=0) > states('input_number.sump_pump_on') | float(default=0) }}"
|
||||
icon: mdi:pump
|
||||
attributes:
|
||||
model_number: "testmodel"
|
||||
serial_number: "testserial"
|
||||
power: "{{ states('sensor.pm_sump_pump_plug_w') | float(default=0)}}"
|
||||
|
||||
- unique_id: templatebinarysensor.something_open_hvac_on
|
||||
default_entity_id: binary_sensor.something_open_hvac_on
|
||||
name: Something Open HVAC On
|
||||
device_class: problem
|
||||
delay_on:
|
||||
minutes: 5
|
||||
state: >-
|
||||
{% if 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') %}
|
||||
{% if is_state_attr('climate.thermostat', 'hvac_action', 'cooling') and states('sensor.master_bedroom_multisensor_air_temperature') | int < states('sensor.front_porch_temperature') | int %}
|
||||
{{'true'}}
|
||||
{% elif is_state_attr('climate.thermostat', 'hvac_action', 'heating') and states('sensor.master_bedroom_multisensor_air_temperature') | int > states('sensor.front_porch_temperature') | int %}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.hvac_delta_too_small_for_too_long
|
||||
default_entity_id: binary_sensor.hvac_delta_too_small_for_too_long
|
||||
name: HVAC Delta Too Small For Too Long
|
||||
device_class: problem
|
||||
delay_on:
|
||||
minutes: 10
|
||||
state: >-
|
||||
{% if is_state('binary_sensor.hvac_delta_sensors_unavailable','on') %}
|
||||
{{'false'}}
|
||||
{% else %}
|
||||
{% if is_state_attr('climate.thermostat', 'hvac_action', 'cooling') and states('sensor.hvac_delta_temperature') | int(default=0) >= -5 %}
|
||||
{{'true'}}
|
||||
{% elif is_state_attr('climate.thermostat', 'hvac_action', 'heating') and states('sensor.hvac_delta_temperature') | int(default=0) <= 5 %}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.have_custody
|
||||
default_entity_id: binary_sensor.have_custody
|
||||
name: Have Custody
|
||||
state: >-
|
||||
{% if is_state('calendar.my_custody', 'on') %}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.computer_chair_contact_occupied
|
||||
default_entity_id: binary_sensor.computer_chair_contact_occupied
|
||||
name: Computer Chair Occupied
|
||||
state: "{{ states('binary_sensor.computer_chair_contact') | string == 'off' }}"
|
||||
|
||||
# If the AC has been on for more than 5 minutes, the Delta Temperature should be more than 5
|
||||
# ( The air coming out of a vent should be more than 5 degrees cooler than the air going into a return )
|
||||
- unique_id: templatebinarysensor.hvac_delta_temperature_good
|
||||
default_entity_id: binary_sensor.hvac_delta_temperature_good
|
||||
name: HVAC Delta Temperature Good
|
||||
state: >-
|
||||
{% if states("sensor.hvac_supply_temperature") | string != "unknown" and states("sensor.hvac_return_temperature") | string != "unknown" %}
|
||||
{% if states('sensor.hvac_action') | string == 'cooling' and as_timestamp(now())-(as_timestamp(states.sensor.hvac_action.last_changed))|round(1) > 300 %}
|
||||
{% if states('sensor.hvac_delta_temperature') | float(default=0) < -10 %}
|
||||
{{ 'true' }}
|
||||
{% else %}
|
||||
{{ 'false' }}
|
||||
{% endif %}
|
||||
{% elif states('sensor.hvac_action') | string == 'heating' and as_timestamp(now())-(as_timestamp(states.sensor.hvac_action.last_changed))|round(1) > 300 %}
|
||||
{% if states('sensor.hvac_delta_temperature') | float(default=0) > 10 %}
|
||||
{{ 'true' }}
|
||||
{% else %}
|
||||
{{ 'false' }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.hvac_delta_sensors_unavailable
|
||||
default_entity_id: binary_sensor.hvac_delta_sensors_unavailable
|
||||
name: HVAC Delta Sensors Unavailable
|
||||
device_class: connectivity
|
||||
delay_on:
|
||||
minutes: 5
|
||||
state: >-
|
||||
{% if states("sensor.hvac_supply_temperature") | string == 'unknown' or states("sensor.hvac_return_temperature") | string == 'unknown' or states("sensor.hvac_supply_temperature") | string == 'unavailable' or states("sensor.hvac_return_temperature") | string == 'unavailable' %}
|
||||
{{ 'true' }}
|
||||
{% else %}
|
||||
{{ 'false' }}
|
||||
{% endif %}
|
||||
|
||||
# Is it too cold or too warm outside to turn on the fan?
|
||||
- unique_id: templatebinarysensor.temp_just_right
|
||||
default_entity_id: binary_sensor.temp_just_right
|
||||
name: Temp Just Right
|
||||
state: >-
|
||||
{% if states('sensor.front_porch_temperature') | float(default=0) > 50 and states('sensor.front_porch_temperature') | float(default=0) < 90 %}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{ 'false' }}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.is_dark
|
||||
default_entity_id: binary_sensor.is_dark
|
||||
name: Is Dark
|
||||
state: "{{ (states('sensor.front_porch_light_level') | int(0) < states('input_number.is_dark') | int(0)) or (states('sensor.front_porch_light_level') | int(0) < 30 and is_state('light.front_porch_overhead','on')) }}"
|
||||
|
||||
- unique_id: templatebinarysensor.is_dim
|
||||
default_entity_id: binary_sensor.is_dim
|
||||
name: Is Dim
|
||||
state: "{{ states('sensor.front_porch_light_level') | int(0) >= states('input_number.is_dark') | int(0) and states('sensor.front_porch_light_level') | int(0) < states('input_number.is_daylight') | int(0) }}"
|
||||
|
||||
- unique_id: templatebinarysensor.is_daylight
|
||||
default_entity_id: binary_sensor.is_daylight
|
||||
name: Is Daylight
|
||||
state: "{{ states('sensor.front_porch_light_level') | int(0) >= states('input_number.is_daylight') | int(0) }}"
|
||||
|
||||
- unique_id: templatebinarysensor.garage_open_nobody_home
|
||||
default_entity_id: binary_sensor.garage_open_nobody_home
|
||||
name: "Garage Open Nobody Home"
|
||||
state: >-
|
||||
{% if is_state('cover.garage_door', 'open') %}
|
||||
{% if is_state('input_boolean.home_occupied', 'off') %}
|
||||
{{ 'true' }}
|
||||
{% else %}
|
||||
{{ 'false' }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ 'false' }}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.adults_at_home
|
||||
default_entity_id: binary_sensor.adults_at_home
|
||||
name: Adults At Home
|
||||
state: >-
|
||||
{% if
|
||||
is_state('input_boolean.clint_home','on') or
|
||||
is_state('input_boolean.kristy_home','on')
|
||||
%}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.adults_in_bed
|
||||
default_entity_id: binary_sensor.adults_in_bed
|
||||
name: Adults In Bed
|
||||
state: >-
|
||||
{% if
|
||||
is_state('binary_sensor.adults_at_home','on') and
|
||||
(is_state('input_boolean.clint_home','off') or is_state('input_boolean.clint_in_bed', 'on')) and
|
||||
(is_state('input_boolean.kristy_home','off') or is_state('input_boolean.kristy_in_bed', 'on'))
|
||||
%}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.adults_asleep
|
||||
default_entity_id: binary_sensor.adults_asleep
|
||||
name: Adults Asleep
|
||||
state: >-
|
||||
{% if
|
||||
is_state('binary_sensor.adults_at_home','on') and
|
||||
(is_state('input_boolean.clint_home','off') or is_state('input_boolean.clint_is_awake', 'off')) and
|
||||
(is_state('input_boolean.kristy_home','off') or is_state('input_boolean.kristy_is_awake', 'off'))
|
||||
%}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.teens_at_home
|
||||
default_entity_id: binary_sensor.teens_at_home
|
||||
name: Teens At Home
|
||||
state: >-
|
||||
{% if
|
||||
is_state('input_boolean.marshall_home','on') or
|
||||
is_state('input_boolean.tess_home','on')
|
||||
%}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.teens_in_bed
|
||||
default_entity_id: binary_sensor.teens_in_bed
|
||||
name: Teens In Bed
|
||||
state: >-
|
||||
{% if
|
||||
is_state('binary_sensor.teens_at_home','on') and
|
||||
(is_state('input_boolean.marshall_home','off') or is_state('input_boolean.marshall_in_bed', 'on')) and
|
||||
(is_state('input_boolean.tess_home','off') or is_state('input_boolean.tess_in_bed', 'on'))
|
||||
%}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.teens_asleep
|
||||
default_entity_id: binary_sensor.teens_asleep
|
||||
name: Teens Asleep
|
||||
state: >-
|
||||
{% if
|
||||
is_state('binary_sensor.teens_at_home','on') and
|
||||
(is_state('input_boolean.marshall_home','off') or is_state('input_boolean.marshall_is_awake', 'off')) and
|
||||
(is_state('input_boolean.tess_home','off') or is_state('input_boolean.tess_is_awake', 'off'))
|
||||
%}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.kids_at_home
|
||||
default_entity_id: binary_sensor.kids_at_home
|
||||
name: Kids At Home
|
||||
state: >-
|
||||
{% if
|
||||
is_state('input_boolean.emmett_home','on') or
|
||||
is_state('input_boolean.bridget_home','on') or
|
||||
is_state('input_boolean.ebin_home','on')
|
||||
%}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.kids_in_bed
|
||||
default_entity_id: binary_sensor.kids_in_bed
|
||||
name: Kids In Bed
|
||||
state: >-
|
||||
{% if
|
||||
is_state('input_boolean.kids_away','off') and
|
||||
(is_state('input_boolean.emmett_home','off') or is_state('input_boolean.emmett_in_bed', 'on')) and
|
||||
(is_state('input_boolean.bridget_home','off') or is_state('input_boolean.bridget_in_bed', 'on')) and
|
||||
(is_state('input_boolean.ebin_home','off') or is_state('input_boolean.ebin_in_bed', 'on'))
|
||||
%}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.kids_asleep
|
||||
default_entity_id: binary_sensor.kids_asleep
|
||||
name: Kids Asleep
|
||||
state: >-
|
||||
{% if
|
||||
is_state('input_boolean.kids_away','off') and
|
||||
(is_state('input_boolean.emmett_home','off') or is_state('input_boolean.emmett_is_awake', 'off')) and
|
||||
(is_state('input_boolean.bridget_home','off') or is_state('input_boolean.bridget_is_awake', 'off')) and
|
||||
(is_state('input_boolean.ebin_home','off') or is_state('input_boolean.ebin_is_awake', 'off'))
|
||||
%}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatebinarysensor.clint_home_during_work_hours
|
||||
default_entity_id: binary_sensor.clint_home_during_work_hours
|
||||
name: Clint Home During Work Hours
|
||||
state: "{{ states('input_boolean.clint_home') == 'on' and states('binary_sensor.work_hours') == 'on' }}"
|
||||
|
||||
- unique_id: templatebinarysensor.back_yard_light_left_on
|
||||
default_entity_id: binary_sensor.back_yard_light_left_on
|
||||
name: Back Yard Light Left On
|
||||
state: "{{ is_state('light.deck','on') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.storage_room_light_left_on
|
||||
default_entity_id: binary_sensor.storage_room_light_left_on
|
||||
name: Storage Room Light Left On
|
||||
state: "{{ is_state('light.storage_room','on') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.furnace_room_light_left_on
|
||||
default_entity_id: binary_sensor.furnace_room_light_left_on
|
||||
name: Furnace Room Light Left On
|
||||
state: "{{ is_state('light.furnace_room','on') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.boys_room_light_left_on
|
||||
default_entity_id: binary_sensor.boys_room_light_left_on
|
||||
name: Boys Room Light Left On
|
||||
state: "{{ is_state('light.boys_room_hue','on') and is_state('input_boolean.boys_room_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.mancave_light_left_on
|
||||
default_entity_id: binary_sensor.mancave_light_left_on
|
||||
name: Mancave Light Left On
|
||||
state: "{{ is_state('light.mancave','on') and is_state('input_boolean.mancave_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.front_yard_light_left_on
|
||||
default_entity_id: binary_sensor.front_yard_light_left_on
|
||||
name: Front Yard Light Left On
|
||||
state: "{{ is_state('light.front_porch_overhead','on') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.computer_area_light_left_on
|
||||
default_entity_id: binary_sensor.computer_area_light_left_on
|
||||
name: Computer Area Light Left On
|
||||
state: "{{ is_state('light.computer_area_hue','on') and is_state('input_boolean.computer_area_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.dining_room_light_left_on
|
||||
default_entity_id: binary_sensor.dining_room_light_left_on
|
||||
name: Dining Room Light Left On
|
||||
state: "{{ is_state('light.dining_room_switch','on') and is_state('input_boolean.dining_room_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.entryway_light_left_on
|
||||
default_entity_id: binary_sensor.entryway_light_left_on
|
||||
name: Entryway Light Left On
|
||||
state: "{{ is_state('light.entryway_hue','on') and is_state('input_boolean.entryway_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.front_room_light_left_on
|
||||
default_entity_id: binary_sensor.front_room_light_left_on
|
||||
name: Front Room Light Left On
|
||||
state: "{{ is_state('light.front_room_hue','on') and is_state('input_boolean.front_room_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.garage_light_left_on
|
||||
default_entity_id: binary_sensor.garage_light_left_on
|
||||
name: Garage Light Left On
|
||||
state: "{{ is_state('light.garage_overhead','on') and is_state('input_boolean.garage_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.great_room_light_left_on
|
||||
default_entity_id: binary_sensor.great_room_light_left_on
|
||||
name: Great Room Light Left On
|
||||
state: "{{ is_state('light.great_room_hue','on') and is_state('input_boolean.great_room_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.kitchen_light_left_on
|
||||
default_entity_id: binary_sensor.kitchen_light_left_on
|
||||
name: Kitchen Light Left On
|
||||
state: "{{ is_state('light.kitchen_hue','on') and is_state('input_boolean.kitchen_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.master_bathroom_light_left_on
|
||||
default_entity_id: binary_sensor.master_bathroom_light_left_on
|
||||
name: Master Bathroom Light Left On
|
||||
state: "{{ is_state('light.master_bathroom_hue','on') and is_state('input_boolean.master_bathroom_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.master_bedroom_light_left_on
|
||||
default_entity_id: binary_sensor.master_bedroom_light_left_on
|
||||
name: Master Bedroom Light Left On
|
||||
state: "{{ is_state('light.master_bedroom_hue','on') and is_state('input_boolean.master_bedroom_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.nursery_light_left_on
|
||||
default_entity_id: binary_sensor.nursery_light_left_on
|
||||
name: Nursery Light Left On
|
||||
state: "{{ is_state('light.nursery_hue','on') and is_state('input_boolean.nursery_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.utility_room_light_left_on
|
||||
default_entity_id: binary_sensor.utility_room_light_left_on
|
||||
name: Utility Room Light Left On
|
||||
state: "{{ is_state('light.utility_room_hue','on') and is_state('input_boolean.utility_room_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
- unique_id: templatebinarysensor.take_dumpster_to_curb
|
||||
default_entity_id: binary_sensor.take_dumpster_to_curb
|
||||
name: Take Dumpster To Curb
|
||||
state: "{{ iif(is_state('input_boolean.trash_out','off') and state_attr('calendar.trash_schedule','offset_reached') )}}"
|
||||
icon: mdi:trash-can
|
||||
|
||||
- unique_id: templatesensor.take_trash_out
|
||||
default_entity_id: binary_sensor.take_trash_out
|
||||
name: "Take Trash Out"
|
||||
icon: mdi:trash-can
|
||||
state: "{{ (is_state('calendar.trash_schedule','on') or state_attr('calendar.trash_schedule','offset_reached')) and is_state('input_boolean.trash_out','off') }}"
|
||||
|
||||
- unique_id: templatebinarysensor.need_salt
|
||||
default_entity_id: binary_sensor.need_salt
|
||||
name: Need Salt
|
||||
state: "{{ is_state('binary_sensor.furnace_room_multisensor_status', 'on') and is_state('sensor.furnace_room_multisensor_salt_level_in_bags','1') }}"
|
||||
icon: mdi:shaker-outline
|
||||
delay_on:
|
||||
seconds: 900
|
||||
|
||||
- unique_id: templatebinarysensor.emmetts_bed
|
||||
default_entity_id: binary_sensor.emmetts_bed
|
||||
name: Emmett's Bed
|
||||
state: "{{ states('binary_sensor.white_bed_occupied') }}"
|
||||
icon: "{{ iif(is_state('binary_sensor.white_bed_occupied','on'),'mdi:bed','mdi:bed-empty','mdi:bed-outline')}}"
|
||||
|
||||
- unique_id: templatebinarysensor.bridgets_bed
|
||||
default_entity_id: binary_sensor.bridgets_bed
|
||||
name: Bridget's Bed
|
||||
state: "{{ states('binary_sensor.black_bed_occupied') }}"
|
||||
icon: "{{ iif(is_state('binary_sensor.black_bed_occupied','on'),'mdi:bed','mdi:bed-empty','mdi:bed-outline')}}"
|
||||
|
||||
- unique_id: templatebinarysensor.check_mail
|
||||
default_entity_id: binary_sensor.check_mail
|
||||
name: Check Mail
|
||||
state: "{{is_state('input_boolean.incoming_mail','on') and is_state('input_boolean.mail_checked','off')}}"
|
||||
icon: mdi:mailbox
|
||||
|
||||
- unique_id: templatebinarysensor.close_windows
|
||||
default_entity_id: binary_sensor.close_windows
|
||||
name: Close Windows
|
||||
state: "{{is_state('group.my_exterior_windows','on') and is_state('binary_sensor.impending_rain','on')}}"
|
||||
icon: mdi:window-open
|
||||
|
||||
- unique_id: templatebinarysensor.close_kitchen_fridge
|
||||
default_entity_id: binary_sensor.close_kitchen_fridge
|
||||
name: Close Kitchen Fridge
|
||||
state: "{{is_state('binary_sensor.kitchen_fridge_door_contact','on') }}"
|
||||
icon: mdi:fridge-variant
|
||||
delay_on:
|
||||
minutes: 3
|
||||
|
||||
- unique_id: templatebinarysensor.close_kitchen_freezer
|
||||
default_entity_id: binary_sensor.close_kitchen_freezer
|
||||
name: Close Kitchen Freezer
|
||||
state: "{{is_state('binary_sensor.kitchen_freezer_door_contact','on') }}"
|
||||
icon: mdi:fridge-variant
|
||||
delay_on:
|
||||
minutes: 3
|
||||
@@ -0,0 +1,246 @@
|
||||
template:
|
||||
- sensor:
|
||||
# - unique_id: templatesensor.hvac_mode
|
||||
# default_entity_id: sensor.hvac_mode
|
||||
# name: HVAC Mode
|
||||
# state: '{{states("climate.thermostat")}}'
|
||||
|
||||
- unique_id: templatesensor.hvac_equipment_running
|
||||
default_entity_id: sensor.hvac_equipment_running
|
||||
name: HVAC Equipment Running
|
||||
state: '{{state_attr("climate.thermostat", "equipment_running")|default("none", true)}}'
|
||||
|
||||
- unique_id: templatesensor.hvac_action
|
||||
default_entity_id: sensor.hvac_action
|
||||
state: '{{state_attr("climate.thermostat", "hvac_action")}}'
|
||||
name: HVAC Action
|
||||
|
||||
- unique_id: templatesensor.clint_status
|
||||
default_entity_id: sensor.clint_status
|
||||
state: '{{ states.input_select.clint_status_dropdown.state }}'
|
||||
name: 'Clint'
|
||||
|
||||
- unique_id: templatesensor.emmett_status
|
||||
default_entity_id: sensor.emmett_status
|
||||
state: '{{ states.input_select.emmett_status_dropdown.state }}'
|
||||
name: 'Emmett'
|
||||
|
||||
- unique_id: templatesensor.bridget_status
|
||||
default_entity_id: sensor.bridget_status
|
||||
state: '{{ states.input_select.bridget_status_dropdown.state }}'
|
||||
name: 'Bridget'
|
||||
|
||||
- unique_id: templatesensor.kristy_status
|
||||
default_entity_id: sensor.kristy_status
|
||||
state: '{{ states.input_select.kristy_status_dropdown.state }}'
|
||||
name: 'Kristy'
|
||||
|
||||
- unique_id: templatesensor.marshall_status
|
||||
default_entity_id: sensor.marshall_status
|
||||
state: '{{ states.input_select.marshall_status_dropdown.state }}'
|
||||
name: 'Marshall'
|
||||
|
||||
- unique_id: templatesensor.tess_status
|
||||
default_entity_id: sensor.tess_status
|
||||
state: '{{ states.input_select.tess_status_dropdown.state }}'
|
||||
name: 'Tess'
|
||||
|
||||
- unique_id: templatesensor.ebin_status
|
||||
default_entity_id: sensor.ebin_status
|
||||
state: '{{ states.input_select.ebin_status_dropdown.state }}'
|
||||
name: 'Ebin'
|
||||
|
||||
- unique_id: templatesensor.people_count
|
||||
default_entity_id: sensor.people_count
|
||||
name: 'People Count'
|
||||
state: >
|
||||
{{[ states.input_boolean.clint_home,
|
||||
states.input_boolean.emmett_home,
|
||||
states.input_boolean.bridget_home,
|
||||
states.input_boolean.kristy_home,
|
||||
states.input_boolean.marshall_home,
|
||||
states.input_boolean.tess_home,
|
||||
states.input_boolean.ebin_home,
|
||||
states.input_boolean.guest_home ]
|
||||
| selectattr('state', 'eq', 'on') | list | count}}
|
||||
|
||||
- unique_id: templatesensor.count_automations
|
||||
default_entity_id: sensor.count_automations
|
||||
state: "{{ states.automation | list | length }}"
|
||||
|
||||
- unique_id: templatesensor.count_scripts
|
||||
default_entity_id: sensor.count_scripts
|
||||
state: "{{ states.script | list | length }}"
|
||||
|
||||
- unique_id: templatesensor.count_device_trackers
|
||||
default_entity_id: sensor.count_device_trackers
|
||||
state: "{{ states.device_tracker | list | length }}"
|
||||
|
||||
- unique_id: templatesensor.count_binary_sensors
|
||||
default_entity_id: sensor.count_binary_sensors
|
||||
state: "{{ states.binary_sensor | list | length }}"
|
||||
|
||||
- unique_id: templatesensor.count_sensors
|
||||
default_entity_id: sensor.count_sensors
|
||||
state: "{{ states.sensor | list | length }}"
|
||||
|
||||
- unique_id: templatesensor.count_switches
|
||||
default_entity_id: sensor.count_switches
|
||||
state: "{{ states.switch | list | length }}"
|
||||
|
||||
- unique_id: templatesensor.count_zones
|
||||
default_entity_id: sensor.count_zones
|
||||
state: "{{ states.zone | list | length }}"
|
||||
|
||||
- unique_id: templatesensor.count_input_booleans
|
||||
default_entity_id: sensor.count_input_booleans
|
||||
state: "{{ states.input_boolean | list | length }}"
|
||||
|
||||
- unique_id: templatesensor.count_input_numbers
|
||||
default_entity_id: sensor.count_input_numbers
|
||||
state: "{{ states.input_number | list | length }}"
|
||||
|
||||
- unique_id: templatesensor.count_input_texts
|
||||
default_entity_id: sensor.count_input_texts
|
||||
state: "{{ states.input_text | list | length }}"
|
||||
|
||||
- unique_id: templatesensor.count_input_selects
|
||||
default_entity_id: sensor.count_input_selects
|
||||
state: "{{ states.input_select | list | length }}"
|
||||
|
||||
- unique_id: templatesensor.count_input_datetimes
|
||||
default_entity_id: sensor.count_input_datetimes
|
||||
state: "{{ states.input_datetime | list | length }}"
|
||||
|
||||
- unique_id: templatesensor.steam1_game
|
||||
default_entity_id: sensor.steam1_game
|
||||
state: >-
|
||||
{% if state_attr('sensor.steam_76561197960668089', 'game') is not none%}
|
||||
{{ state_attr('sensor.steam_76561197960668089', 'game') }}
|
||||
{% else %}
|
||||
{{ states('sensor.steam_76561197960668089') }}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatesensor.non_summer_per_kwh
|
||||
default_entity_id: sensor.nonsummer_per_kwh
|
||||
name: 'Non-Summer Rate'
|
||||
state: 0.100496
|
||||
icon: mdi:currency-usd
|
||||
unit_of_measurement: '$/kWh'
|
||||
|
||||
- unique_id: templatesensor.summer_nonpeak_per_kwh
|
||||
default_entity_id: sensor.summernonpeak_per_kwh
|
||||
name: 'Summer Non-Peak Rate'
|
||||
state: 0.100649
|
||||
icon: mdi:currency-usd
|
||||
unit_of_measurement: '$/kWh'
|
||||
|
||||
- unique_id: templatesensor.summerpeak_per_kwh
|
||||
default_entity_id: sensor.summerpeak_per_kwh
|
||||
name: 'Summer Peak Rate'
|
||||
state: 0.149656
|
||||
icon: mdi:currency-usd
|
||||
unit_of_measurement: '$/kWh'
|
||||
|
||||
- unique_id: templatesensor.energy_cost
|
||||
default_entity_id: sensor.energy_cost
|
||||
name: 'Energy Cost'
|
||||
state: >-
|
||||
{% if now().month > 9 or now().month < 6 -%}
|
||||
0.100496
|
||||
{%- else -%}
|
||||
{%- if now().weekday() < 5 and now().hour >= 14 and now().hour <= 19 -%}
|
||||
0.149656
|
||||
{%- else -%}
|
||||
0.100649
|
||||
{%- endif -%}
|
||||
{% endif %}
|
||||
icon: mdi:currency-usd
|
||||
unit_of_measurement: '$/kWh'
|
||||
|
||||
- unique_id: templatesensor.energy_tariff
|
||||
default_entity_id: sensor.energy_tariff
|
||||
name: 'Energy Tariff'
|
||||
state: >-
|
||||
{% if now().month > 9 or now().month < 6 -%}
|
||||
Non-Summer
|
||||
{%- else -%}
|
||||
{%- if now().weekday() < 5 and now().hour >= 14 and now().hour <= 19 -%}
|
||||
Summer Peak
|
||||
{%- else -%}
|
||||
Summer Non-Peak
|
||||
{%- endif -%}
|
||||
{% endif %}
|
||||
|
||||
- unique_id: templatesensor.general_waste
|
||||
default_entity_id: sensor.general_waste
|
||||
name: 'General Waste'
|
||||
icon: mdi:trash-can
|
||||
state: >-
|
||||
{% if is_state('calendar.trash_schedule','on') %}
|
||||
today
|
||||
{% elif state_attr('calendar.trash_schedule','offset_reached') %}
|
||||
tomorrow
|
||||
{% else %}
|
||||
future
|
||||
{% endif %}
|
||||
|
||||
#my_room_status
|
||||
- unique_id: temlatesensor.occupied_room_count
|
||||
default_entity_id: sensor.occupied_room_count
|
||||
name: Rooms Occupied
|
||||
state: "{{ (expand('group.my_room_status') | selectattr('state', 'eq', 'on')) | list | count |int(default=0) }}"
|
||||
icon: "{{ iif(is_state('group.my_room_status', 'on'), 'mdi:floor-plan','mdi:floor-plan') }}"
|
||||
|
||||
- unique_id: temlatesensor.speakers_on_count
|
||||
default_entity_id: sensor.speakers_on_count
|
||||
name: Speakers On
|
||||
state: "{{ (expand('group.all_my_speakers') | selectattr('state', 'eq', 'playing')) | list | count |int(default=0) }}"
|
||||
icon: "{{ iif(is_state('group.all_my_speakers', 'on'), 'mdi:speaker-multiple','mdi:speaker-off') }}"
|
||||
|
||||
- unique_id: temlatesensor.lights_on_count
|
||||
default_entity_id: sensor.lights_on_count
|
||||
name: Lights On
|
||||
state: "{{ (expand('group.my_lights') | selectattr('state', 'eq', 'on')) | list | count |int(default=0) }}"
|
||||
icon: "{{ iif(is_state('group.my_lights', 'on'), 'mdi:lightbulb-group','mdi:lightbulb-group-off') }}"
|
||||
|
||||
- unique_id: temlatesensor.open_windows_count
|
||||
default_entity_id: sensor.open_windows_count
|
||||
name: Open Windows
|
||||
state: "{{ (expand('group.my_exterior_windows') | selectattr('state', 'eq', 'on')) | list | count |int(default=0) }}"
|
||||
icon: "{{ iif(is_state('group.my_exterior_windows', 'on'), 'mdi:window-open-variant','mdi:window-closed-variant') }}"
|
||||
|
||||
- unique_id: temlatesensor.open_external_doors_count
|
||||
default_entity_id: sensor.open_external_doors_count
|
||||
name: Open External Doors
|
||||
state: "{{ (expand('group.my_exterior_doors') | selectattr('state', 'eq', 'on')) | list | count |int(default=0) }}"
|
||||
icon: "{{ iif(is_state('group.my_exterior_windows', 'on'), 'mdi:door-open','mdi:door') }}"
|
||||
|
||||
- unique_id: temlatesensor.frigate_person_count
|
||||
default_entity_id: sensor.frigate_person_count
|
||||
name: Frigate Person Count
|
||||
state: >-
|
||||
{{
|
||||
states('sensor.boys_room_person_count')|int(default=0) +
|
||||
states('sensor.computer_area_person_count')|int(default=0) +
|
||||
states('sensor.dining_room_person_count')|int(default=0) +
|
||||
states('sensor.entryway_person_count')|int(default=0) +
|
||||
states('sensor.front_porch_person_count')|int(default=0) +
|
||||
states('sensor.front_room_person_count')|int(default=0) +
|
||||
states('sensor.furnace_room_person_count')|int(default=0) +
|
||||
states('sensor.great_room_person_count')|int(default=0) +
|
||||
states('sensor.kitchen_person_count')|int(default=0) +
|
||||
states('sensor.master_bedroom_person_count')|int(default=0) +
|
||||
states('sensor.nursery_person_count')|int(default=0) +
|
||||
states('sensor.utility_room_person_count')|int(default=0) +
|
||||
states('sensor.walkway_person_count')|int(default=0) +
|
||||
states('sensor.workshop_person_count')|int(default=0)
|
||||
}}
|
||||
icon: mdi:human-queue
|
||||
|
||||
# monitored_daily_kwh:
|
||||
# unique_id: templatesensor.monitored_daily_kwh
|
||||
# name: 'Monitored Daily [kWh]'
|
||||
# icon: mdi:flash
|
||||
# unit_of_measurement: kWh
|
||||
# state: "{{ states('sensor.basement_and_laundry_lights_and_plugs_kwh')|float(default=0) + }}"
|
||||
Reference in New Issue
Block a user