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:
@@ -18,7 +18,7 @@ observations:
|
||||
# platform: state
|
||||
# to_state: 'on'
|
||||
|
||||
- entity_id: binary_sensor.master_bathroom_too_humid
|
||||
- entity_id: binary_sensor.bathroom_multisensor_too_humid
|
||||
prob_given_true: .99
|
||||
prob_given_false: 0.05
|
||||
platform: state
|
||||
|
||||
@@ -18,7 +18,7 @@ observations:
|
||||
# platform: state
|
||||
# to_state: 'on'
|
||||
|
||||
- entity_id: binary_sensor.utility_room_too_humid
|
||||
- entity_id: binary_sensor.utility_room_multisensor_too_humid
|
||||
prob_given_true: .99
|
||||
prob_given_false: 0.05
|
||||
platform: state
|
||||
|
||||
@@ -1,725 +0,0 @@
|
||||
platform: template
|
||||
sensors:
|
||||
ten_minute_warning_kids_bedtime:
|
||||
unique_id: templatebinarysensor.ten_minute_warning_kids_bedtime
|
||||
friendly_name: Ten Minute Warning Kids Bedtime
|
||||
icon_template: mdi:bed-clock
|
||||
value_template: "{{ now() >= today_at(states('input_datetime.kids_bedtime_announcement_time')) - timedelta(minutes= 10) }}"
|
||||
|
||||
pixel_7_connected_to_traverse:
|
||||
unique_id: templatebinarysensor.pixel_7_connected_to_traverse
|
||||
friendly_name: Pixel 7 Connected to Traverse
|
||||
icon_template: mdi:cellphone-key
|
||||
value_template: "{{ '30:C3:D9:B0:CA:E4 (Chevrolet MyLink)' in state_attr('sensor.pixel_7_bluetooth_connection','connected_paired_devices') }}"
|
||||
|
||||
humidity_too_low:
|
||||
unique_id: templatebinarysensor.humidity_too_low
|
||||
friendly_name: Humidity Too Low
|
||||
icon_template: mdi:water-minus
|
||||
value_template: "{{ 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) }}"
|
||||
attribute_templates:
|
||||
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') }}"
|
||||
|
||||
humidity_too_high:
|
||||
unique_id: templatebinarysensor.humidity_too_high
|
||||
friendly_name: Humidity Too High
|
||||
icon_template: mdi:water-plus
|
||||
value_template: "{{ 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) }}"
|
||||
attribute_templates:
|
||||
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') }}"
|
||||
|
||||
temperature_too_low:
|
||||
unique_id: templatebinarysensor.temperature_too_low
|
||||
friendly_name: Temperature Too Low
|
||||
icon_template: mdi:thermometer-chevron-down
|
||||
value_template: "{{ 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) }}"
|
||||
attribute_templates:
|
||||
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') }}"
|
||||
|
||||
temperature_too_high:
|
||||
unique_id: templatebinarysensor.temperature_too_high
|
||||
friendly_name: Temperature Too High
|
||||
icon_template: mdi:thermometer-chevron-up
|
||||
value_template: "{{ 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) }}"
|
||||
attribute_templates:
|
||||
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') }}"
|
||||
|
||||
humidity_problem:
|
||||
unique_id: templatebinarysensor.humidity_problem
|
||||
friendly_name: Humidity Problem
|
||||
icon_template: mdi:water-alert
|
||||
value_template: "{{ is_state('binary_sensor.humidity_too_low','on') or is_state('binary_sensor.humidity_too_high','on') }}"
|
||||
|
||||
kids_possible:
|
||||
unique_id: templatebinarysensor.kids_possible
|
||||
friendly_name: Kids Possible
|
||||
icon_template: mdi:human-male-female-child
|
||||
value_template: "{{ 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') }}"
|
||||
|
||||
double_planter_needs_water:
|
||||
unique_id: templatebinarysensor.double_planter_needs_water
|
||||
friendly_name: Double Planter Needs Water
|
||||
value_template: "{{ states('sensor.hasta_soil_sensor_moisture')|float(default=0) <= states('input_number.double_planter_water_alert')|int(default=0) }}"
|
||||
delay_on: "00:05:00"
|
||||
icon_template: >
|
||||
{% if states('sensor.hasta_soil_sensor_moisture') == 'unavailable' %}
|
||||
mdi:flower-outline
|
||||
{% else %}
|
||||
mdi:flower
|
||||
{% endif %}
|
||||
attribute_templates:
|
||||
moisture: "{{states('sensor.hasta_soil_sensor_moisture') | float(default=0)}}"
|
||||
alarm_trigger: "{{states('input_number.double_planter_water_alert') | float(default=0)}}"
|
||||
|
||||
kitchen_fridge_too_warm:
|
||||
unique_id: templatebinarysensor.kitchen_fridge_too_warm
|
||||
friendly_name: Kitchen Fridge Too Warm
|
||||
value_template: "{{ states('sensor.kitchen_fridge_thermostat_temperature')|int(default=0) > states('input_number.kitchen_fridge_alert')|int(default=0) }}"
|
||||
delay_on: "00:30:00"
|
||||
icon_template: >
|
||||
{% 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 %}
|
||||
|
||||
kitchen_freezer_too_warm:
|
||||
unique_id: templatebinarysensor.kitchen_freezer_too_warm
|
||||
friendly_name: Kitchen Freezer Too Warm
|
||||
value_template: "{{ states('sensor.kitchen_freezer_thermostat_temperature')|int(default=0) > states('input_number.kitchen_freezer_alert')|int(default=0) }}"
|
||||
delay_on: "00:30:00"
|
||||
icon_template: >
|
||||
{% 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 %}
|
||||
|
||||
kitchen_fridge_or_freezer_too_warm:
|
||||
unique_id: templatebinarysensor.kitchen_fridge_or_freezer_too_warm
|
||||
friendly_name: Kitchen Fridge or Freezer Too Warm
|
||||
value_template: "{{ 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_template: >
|
||||
{% 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 %}
|
||||
|
||||
master_bed_left_occupied:
|
||||
unique_id: templatebinarysensor.master_bed_left_occupied
|
||||
friendly_name: Master Bedroom Left Occupied
|
||||
icon_template: mdi:bed-king
|
||||
value_template: "{{ is_state('binary_sensor.bed_presence_c175a4_bed_occupied_left','on') }}"
|
||||
|
||||
master_bed_right_occupied:
|
||||
unique_id: templatebinarysensor.master_bed_right_occupied
|
||||
friendly_name: Master Bedroom Right Occupied
|
||||
icon_template: mdi:bed-king
|
||||
value_template: "{{ is_state('binary_sensor.bed_presence_c175a4_bed_occupied_right','on') }}"
|
||||
|
||||
bathroom_getting_humid:
|
||||
unique_id: templatebinarysensor.bathroom_getting_humid
|
||||
friendly_name: Bathroom Getting Humid
|
||||
delay_off:
|
||||
minutes: 5
|
||||
value_template: "{{ states('sensor.bathroom_multisensor_relative_humidity') | float(default=0) - states('sensor.upstairs_mean_humidity') | float(default=100) > 10 }}"
|
||||
icon_template: >
|
||||
{% 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 %}
|
||||
attribute_templates:
|
||||
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) }}"
|
||||
|
||||
utility_room_getting_humid:
|
||||
unique_id: templatebinarysensor.utility_room_getting_humid
|
||||
friendly_name: Utility Room Getting Humid
|
||||
delay_off:
|
||||
minutes: 5
|
||||
#value_template: "{{ 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}}"
|
||||
value_template: "{{ states('sensor.utility_room_thermostat_humidity') | float(default=0) - states('sensor.downstairs_mean_humidity') | float(default=100) > 10 }}"
|
||||
icon_template: >
|
||||
{% 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 %}
|
||||
attribute_templates:
|
||||
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) }}"
|
||||
|
||||
work_hours:
|
||||
unique_id: templatebinarysensor.work_hours
|
||||
friendly_name: Work Hours
|
||||
value_template: "{{ is_state('binary_sensor.is_workday', 'on') and is_state('binary_sensor.business_hours', 'on') }}"
|
||||
icon_template: mdi:briefcase
|
||||
|
||||
# washing_machine:
|
||||
# unique_id: templatebinarysensor.washing_machine
|
||||
# friendly_name: Washing Machine
|
||||
# delay_off:
|
||||
# seconds: 30
|
||||
# icon_template: mdi:washing-machine
|
||||
# availability_template: "{{ states('sensor.pm_laundry_plug_w') not in ['unknown', 'unavailable'] }}"
|
||||
# value_template: "{{ states('sensor.pm_laundry_plug_w')|float(default=0) >= states('input_number.washing_machine_on')|float(default=0) }}"
|
||||
# attribute_templates:
|
||||
# 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)}}"
|
||||
|
||||
# tumble_dryer:
|
||||
# unique_id: binary-sensor-tumble-dryer
|
||||
# friendly_name: Tumble Dryer
|
||||
# delay_off:
|
||||
# seconds: 30
|
||||
# icon_template: mdi:tumble-dryer
|
||||
# availability_template: "{{ states('sensor.pm_dryer_w') not in ['unknown', 'unavailable'] }}"
|
||||
# value_template: "{{ states('sensor.pm_dryer_w')|float(default=0) >= states('input_number.tumble_dryer_on')|float(default=0) }}"
|
||||
# attribute_templates:
|
||||
# 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)}}"
|
||||
|
||||
# dishwasher:
|
||||
# unique_id: templatebinarysensor.dishwasher
|
||||
# friendly_name: Dishwasher
|
||||
# delay_on:
|
||||
# seconds: 60
|
||||
# delay_off:
|
||||
# seconds: 30
|
||||
# icon_template: mdi:dishwasher
|
||||
# availability_template: "{{ states('sensor.pm_dishwasher_w') not in ['unknown', 'unavailable'] }}"
|
||||
# value_template: "{{ states('sensor.pm_dishwasher_w')|float(default=0) >= states('input_number.dishwasher_on')|float(default=0) }}"
|
||||
# attribute_templates:
|
||||
# model_number: 'MDB6769PAS1'
|
||||
# serial_number: 'F24407234'
|
||||
# power: "{{ states('sensor.pm_dishwasher_w') | float(default=0)}}"
|
||||
# target: "{{ states('input_number.dishwasher_on') | float(default=0)}}"
|
||||
|
||||
stove:
|
||||
unique_id: binary-sensor-stove
|
||||
friendly_name: Stove
|
||||
delay_off:
|
||||
seconds: 120
|
||||
value_template: "{{ states('sensor.pm_stove_w') | float(default=0) > states('input_number.stove_on') | float(default=0) }}"
|
||||
icon_template: mdi:stove
|
||||
attribute_templates:
|
||||
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)) }}"
|
||||
|
||||
microwave:
|
||||
unique_id: binary-sensor-microwave
|
||||
friendly_name: Microwave
|
||||
value_template: "{{ states('sensor.pm_microwave_plug_w') | float(default=0) > states('input_number.microwave_on') | float(default=0) }}"
|
||||
icon_template: mdi:microwave
|
||||
attribute_templates:
|
||||
model_number: "testmodel"
|
||||
serial_number: "testserial"
|
||||
power: "{{ states('sensor.pm_microwave_plug_w') | float(default=0)}}"
|
||||
|
||||
furnace:
|
||||
unique_id: binary-sensor-furnace
|
||||
friendly_name: Furnace
|
||||
value_template: "{{ states('sensor.pm_furnace_w') | float(default=0) > states('input_number.furnace_on') | float(default=0) }}"
|
||||
icon_template: mdi:radiator
|
||||
attribute_templates:
|
||||
model_number: "testmodel"
|
||||
serial_number: "testserial"
|
||||
power: "{{ states('sensor.pm_furnace_w') | float(default=0)}}"
|
||||
|
||||
heat_pump:
|
||||
unique_id: binary-sensor-heat-pump
|
||||
friendly_name: Heat Pump
|
||||
value_template: "{{ states('sensor.pm_heat_pump_w') | float(default=0) > states('input_number.heat_pump_on') | float(default=0) }}"
|
||||
icon_template: mdi:air-filter
|
||||
attribute_templates:
|
||||
model_number: "testmodel"
|
||||
serial_number: "testserial"
|
||||
power: "{{ states('sensor.pm_heat_pump_w') | float(default=0)}}"
|
||||
|
||||
sump_pump:
|
||||
unique_id: binary-sensor-sump-pump
|
||||
friendly_name: Sump Pump
|
||||
value_template: "{{ states('sensor.pm_sump_pump_plug_w') | float(default=0) > states('input_number.sump_pump_on') | float(default=0) }}"
|
||||
icon_template: mdi:pump
|
||||
attribute_templates:
|
||||
model_number: "testmodel"
|
||||
serial_number: "testserial"
|
||||
power: "{{ states('sensor.pm_sump_pump_plug_w') | float(default=0)}}"
|
||||
|
||||
something_open_hvac_on:
|
||||
unique_id: templatebinarysensor.something_open_hvac_on
|
||||
friendly_name: Something Open HVAC On
|
||||
device_class: problem
|
||||
delay_on:
|
||||
minutes: 5
|
||||
value_template: >-
|
||||
{% 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 %}
|
||||
|
||||
hvac_delta_too_small_for_too_long:
|
||||
unique_id: templatebinarysensor.hvac_delta_too_small_for_too_long
|
||||
friendly_name: HVAC Delta Too Small For Too Long
|
||||
device_class: problem
|
||||
delay_on:
|
||||
minutes: 10
|
||||
value_template: >-
|
||||
{% 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 %}
|
||||
|
||||
have_custody:
|
||||
unique_id: templatebinarysensor.have_custody
|
||||
friendly_name: Have Custody
|
||||
value_template: >-
|
||||
{% if is_state('calendar.my_custody', 'on') %}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
computer_chair_contact_occupied:
|
||||
unique_id: templatebinarysensor.computer_chair_contact_occupied
|
||||
friendly_name: Computer Chair Occupied
|
||||
value_template: "{{ 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 )
|
||||
hvac_delta_temperature_good:
|
||||
unique_id: templatebinarysensor.hvac_delta_temperature_good
|
||||
friendly_name: HVAC Delta Temperature Good
|
||||
value_template: >-
|
||||
{% 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 %}
|
||||
|
||||
hvac_delta_sensors_unavailable:
|
||||
unique_id: templatebinarysensor.hvac_delta_sensors_unavailable
|
||||
friendly_name: HVAC Delta Sensors Unavailable
|
||||
device_class: connectivity
|
||||
delay_on:
|
||||
minutes: 5
|
||||
value_template: >-
|
||||
{% 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?
|
||||
temp_just_right:
|
||||
unique_id: templatebinarysensor.temp_just_right
|
||||
friendly_name: Temp Just Right
|
||||
value_template: >-
|
||||
{% if states('sensor.front_porch_temperature') | float(default=0) > 50 and states('sensor.front_porch_temperature') | float(default=0) < 90 %}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{ 'false' }}
|
||||
{% endif %}
|
||||
|
||||
# Moved to temperature_management.yaml
|
||||
# Is it more than 5 degrees warmer outside?
|
||||
# warmer_outside:
|
||||
# unique_id: templatebinarysensor.warmer_outside
|
||||
# friendly_name: Warmer Outside
|
||||
# value_template: >-
|
||||
# {% if states('sensor.thermostat_temperature') | float(default=0) - 5 < states('sensor.front_yard_thermostat_temperature') | float(default=0) %}
|
||||
# {{'true'}}
|
||||
# {% else %}
|
||||
# {{ 'false' }}
|
||||
# {% endif %}
|
||||
|
||||
# Moved to temperature_management.yaml
|
||||
# Is it more than 5 degrees cooler outside?
|
||||
# cooler_outside:
|
||||
# unique_id: templatebinarysensor.cooler_outside
|
||||
# friendly_name: Cooler Outside
|
||||
# value_template: >-
|
||||
# {% if states('sensor.front_yard_thermostat_temperature') | float(default=0) + 5 < states('sensor.thermostat_temperature') | float(default=0) %}
|
||||
# {{'true'}}
|
||||
# {% else %}
|
||||
# {{ 'false' }}
|
||||
# {% endif %}
|
||||
|
||||
is_dark:
|
||||
unique_id: templatebinarysensor.is_dark
|
||||
friendly_name: Is Dark
|
||||
value_template: "{{ (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')) }}"
|
||||
|
||||
is_dim:
|
||||
unique_id: templatebinarysensor.is_dim
|
||||
friendly_name: Is Dim
|
||||
value_template: "{{ 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) }}"
|
||||
|
||||
is_daylight:
|
||||
unique_id: templatebinarysensor.is_daylight
|
||||
friendly_name: Is Daylight
|
||||
value_template: "{{ states('sensor.front_porch_light_level') | int(0) >= states('input_number.is_daylight') | int(0) }}"
|
||||
|
||||
garage_open_nobody_home:
|
||||
unique_id: templatebinarysensor.garage_open_nobody_home
|
||||
friendly_name: "Garage Open Nobody Home"
|
||||
value_template: >-
|
||||
{% if is_state('cover.garage_door', 'open') %}
|
||||
{% if is_state('input_boolean.home_occupied', 'off') %}
|
||||
{{ 'true' }}
|
||||
{% else %}
|
||||
{{ 'false' }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ 'false' }}
|
||||
{% endif %}
|
||||
|
||||
adults_at_home:
|
||||
unique_id: templatebinarysensor.adults_at_home
|
||||
friendly_name: Adults At Home
|
||||
value_template: >-
|
||||
{% if
|
||||
is_state('input_boolean.clint_home','on') or
|
||||
is_state('input_boolean.kristy_home','on')
|
||||
%}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
adults_in_bed:
|
||||
unique_id: templatebinarysensor.adults_in_bed
|
||||
friendly_name: Adults In Bed
|
||||
value_template: >-
|
||||
{% 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 %}
|
||||
|
||||
adults_asleep:
|
||||
unique_id: templatebinarysensor.adults_asleep
|
||||
friendly_name: Adults Asleep
|
||||
value_template: >-
|
||||
{% 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 %}
|
||||
|
||||
teens_at_home:
|
||||
unique_id: templatebinarysensor.teens_at_home
|
||||
friendly_name: Teens At Home
|
||||
value_template: >-
|
||||
{% if
|
||||
is_state('input_boolean.marshall_home','on') or
|
||||
is_state('input_boolean.tess_home','on')
|
||||
%}
|
||||
{{'true'}}
|
||||
{% else %}
|
||||
{{'false'}}
|
||||
{% endif %}
|
||||
|
||||
teens_in_bed:
|
||||
unique_id: templatebinarysensor.teens_in_bed
|
||||
friendly_name: Teens In Bed
|
||||
value_template: >-
|
||||
{% 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 %}
|
||||
|
||||
teens_asleep:
|
||||
unique_id: templatebinarysensor.teens_asleep
|
||||
friendly_name: Teens Asleep
|
||||
value_template: >-
|
||||
{% 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 %}
|
||||
|
||||
kids_at_home:
|
||||
unique_id: templatebinarysensor.kids_at_home
|
||||
friendly_name: Kids At Home
|
||||
value_template: >-
|
||||
{% 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 %}
|
||||
|
||||
kids_in_bed:
|
||||
unique_id: templatebinarysensor.kids_in_bed
|
||||
friendly_name: Kids In Bed
|
||||
value_template: >-
|
||||
{% 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 %}
|
||||
|
||||
kids_asleep:
|
||||
unique_id: templatebinarysensor.kids_asleep
|
||||
friendly_name: Kids Asleep
|
||||
value_template: >-
|
||||
{% 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 %}
|
||||
|
||||
clint_home_during_work_hours:
|
||||
unique_id: templatebinarysensor.clint_home_during_work_hours
|
||||
friendly_name: Clint Home During Work Hours
|
||||
value_template: "{{ states('input_boolean.clint_home') == 'on' and states('binary_sensor.work_hours') == 'on' }}"
|
||||
|
||||
back_yard_light_left_on:
|
||||
unique_id: templatebinarysensor.back_yard_light_left_on
|
||||
friendly_name: Back Yard Light Left On
|
||||
value_template: "{{ is_state('light.deck','on') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
storage_room_light_left_on:
|
||||
unique_id: templatebinarysensor.storage_room_light_left_on
|
||||
friendly_name: Storage Room Light Left On
|
||||
value_template: "{{ is_state('light.storage_room','on') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
furnace_room_light_left_on:
|
||||
unique_id: templatebinarysensor.furnace_room_light_left_on
|
||||
friendly_name: Furnace Room Light Left On
|
||||
value_template: "{{ is_state('light.furnace_room','on') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
boys_room_light_left_on:
|
||||
unique_id: templatebinarysensor.boys_room_light_left_on
|
||||
friendly_name: Boys Room Light Left On
|
||||
value_template: "{{ is_state('light.boys_room_hue','on') and is_state('input_boolean.boys_room_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
mancave_light_left_on:
|
||||
unique_id: templatebinarysensor.mancave_light_left_on
|
||||
friendly_name: Mancave Light Left On
|
||||
value_template: "{{ is_state('light.mancave','on') and is_state('input_boolean.mancave_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
front_yard_light_left_on:
|
||||
unique_id: templatebinarysensor.front_yard_light_left_on
|
||||
friendly_name: Front Yard Light Left On
|
||||
value_template: "{{ is_state('light.front_porch_overhead','on') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
computer_area_light_left_on:
|
||||
unique_id: templatebinarysensor.computer_area_light_left_on
|
||||
friendly_name: Computer Area Light Left On
|
||||
value_template: "{{ is_state('light.computer_area_hue','on') and is_state('input_boolean.computer_area_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
dining_room_light_left_on:
|
||||
unique_id: templatebinarysensor.dining_room_light_left_on
|
||||
friendly_name: Dining Room Light Left On
|
||||
value_template: "{{ is_state('light.dining_room_switch','on') and is_state('input_boolean.dining_room_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
entryway_light_left_on:
|
||||
unique_id: templatebinarysensor.entryway_light_left_on
|
||||
friendly_name: Entryway Light Left On
|
||||
value_template: "{{ is_state('light.entryway_hue','on') and is_state('input_boolean.entryway_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
front_room_light_left_on:
|
||||
unique_id: templatebinarysensor.front_room_light_left_on
|
||||
friendly_name: Front Room Light Left On
|
||||
value_template: "{{ is_state('light.front_room_hue','on') and is_state('input_boolean.front_room_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
garage_light_left_on:
|
||||
unique_id: templatebinarysensor.garage_light_left_on
|
||||
friendly_name: Garage Light Left On
|
||||
value_template: "{{ is_state('light.garage_overhead','on') and is_state('input_boolean.garage_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
great_room_light_left_on:
|
||||
unique_id: templatebinarysensor.great_room_light_left_on
|
||||
friendly_name: Great Room Light Left On
|
||||
value_template: "{{ is_state('light.great_room_hue','on') and is_state('input_boolean.great_room_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
kitchen_light_left_on:
|
||||
unique_id: templatebinarysensor.kitchen_light_left_on
|
||||
friendly_name: Kitchen Light Left On
|
||||
value_template: "{{ is_state('light.kitchen_hue','on') and is_state('input_boolean.kitchen_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
master_bathroom_light_left_on:
|
||||
unique_id: templatebinarysensor.master_bathroom_light_left_on
|
||||
friendly_name: Master Bathroom Light Left On
|
||||
value_template: "{{ is_state('light.master_bathroom_hue','on') and is_state('input_boolean.master_bathroom_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
master_bedroom_light_left_on:
|
||||
unique_id: templatebinarysensor.master_bedroom_light_left_on
|
||||
friendly_name: Master Bedroom Light Left On
|
||||
value_template: "{{ is_state('light.master_bedroom_hue','on') and is_state('input_boolean.master_bedroom_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
nursery_light_left_on:
|
||||
unique_id: templatebinarysensor.nursery_light_left_on
|
||||
friendly_name: Nursery Light Left On
|
||||
value_template: "{{ is_state('light.nursery_hue','on') and is_state('input_boolean.nursery_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
utility_room_light_left_on:
|
||||
unique_id: templatebinarysensor.utility_room_light_left_on
|
||||
friendly_name: Utility Room Light Left On
|
||||
value_template: "{{ is_state('light.utility_room_hue','on') and is_state('input_boolean.utility_room_occupied','off') }}"
|
||||
delay_on:
|
||||
seconds: 30
|
||||
|
||||
take_dumpster_to_curb:
|
||||
unique_id: templatebinarysensor.take_dumpster_to_curb
|
||||
friendly_name: Take Dumpster To Curb
|
||||
value_template: "{{ iif(is_state('input_boolean.trash_out','off') and state_attr('calendar.trash_schedule','offset_reached') )}}"
|
||||
icon_template: mdi:trash-can
|
||||
|
||||
take_trash_out:
|
||||
unique_id: templatesensor.take_trash_out
|
||||
friendly_name: "Take Trash Out"
|
||||
icon_template: mdi:trash-can
|
||||
value_template: "{{ (is_state('calendar.trash_schedule','on') or state_attr('calendar.trash_schedule','offset_reached')) and is_state('input_boolean.trash_out','off') }}"
|
||||
|
||||
need_salt:
|
||||
unique_id: templatebinarysensor.need_salt
|
||||
friendly_name: Need Salt
|
||||
value_template: "{{ is_state('binary_sensor.furnace_room_multisensor_status', 'on') and is_state('sensor.furnace_room_multisensor_salt_level_in_bags','1') }}"
|
||||
icon_template: mdi:shaker-outline
|
||||
delay_on:
|
||||
seconds: 900
|
||||
|
||||
emmetts_bed:
|
||||
unique_id: templatebinarysensor.emmetts_bed
|
||||
friendly_name: Emmett's Bed
|
||||
value_template: "{{ states('binary_sensor.white_bed_occupied') }}"
|
||||
icon_template: "{{ iif(is_state('binary_sensor.white_bed_occupied','on'),'mdi:bed','mdi:bed-empty','mdi:bed-outline')}}"
|
||||
|
||||
bridgets_bed:
|
||||
unique_id: templatebinarysensor.bridgets_bed
|
||||
friendly_name: Bridget's Bed
|
||||
value_template: "{{ states('binary_sensor.black_bed_occupied') }}"
|
||||
icon_template: "{{ iif(is_state('binary_sensor.black_bed_occupied','on'),'mdi:bed','mdi:bed-empty','mdi:bed-outline')}}"
|
||||
|
||||
check_mail:
|
||||
unique_id: templatebinarysensor.check_mail
|
||||
friendly_name: Check Mail
|
||||
value_template: "{{is_state('input_boolean.incoming_mail','on') and is_state('input_boolean.mail_checked','off')}}"
|
||||
icon_template: mdi:mailbox
|
||||
|
||||
close_windows:
|
||||
unique_id: templatebinarysensor.close_windows
|
||||
friendly_name: Close Windows
|
||||
value_template: "{{is_state('group.my_exterior_windows','on') and is_state('binary_sensor.impending_rain','on')}}"
|
||||
icon_template: mdi:window-open
|
||||
|
||||
close_kitchen_fridge:
|
||||
unique_id: templatebinarysensor.close_kitchen_fridge
|
||||
friendly_name: Close Kitchen Fridge
|
||||
value_template: "{{is_state('binary_sensor.kitchen_fridge_door_contact','on') }}"
|
||||
icon_template: mdi:fridge-variant
|
||||
delay_on:
|
||||
minutes: 3
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
platform: template
|
||||
covers:
|
||||
garage_door:
|
||||
unique_id: templatecover.garage_door
|
||||
friendly_name: "Garage Door"
|
||||
device_class: garage
|
||||
value_template: "{{is_state('binary_sensor.garage_door','on')}}"
|
||||
template:
|
||||
- cover:
|
||||
- unique_id: templatecover.garage_door
|
||||
device_class: GARAGE
|
||||
open_cover:
|
||||
action: switch.turn_on
|
||||
- action: switch.turn_on
|
||||
data:
|
||||
entity_id: switch.shelly_garage_door
|
||||
close_cover:
|
||||
action: switch.turn_on
|
||||
- action: switch.turn_on
|
||||
data:
|
||||
entity_id: switch.shelly_garage_door
|
||||
stop_cover:
|
||||
action: switch.turn_on
|
||||
- action: switch.turn_on
|
||||
data:
|
||||
entity_id: switch.shelly_garage_door
|
||||
default_entity_id: cover.garage_door
|
||||
name: Garage Door
|
||||
state: "{{is_state('binary_sensor.garage_door','on')}}"
|
||||
@@ -1,23 +1,27 @@
|
||||
platform: template
|
||||
fans:
|
||||
utility_room_vent:
|
||||
unique_id: template_fan.utility_room_vent
|
||||
friendly_name: "Utility Room Vent"
|
||||
value_template: "{{ states('switch.utility_room_vent_switch') }}"
|
||||
template:
|
||||
- fan:
|
||||
- unique_id: template_fan.utility_room_vent
|
||||
turn_on:
|
||||
action: switch.turn_on
|
||||
entity_id: switch.utility_room_vent_switch
|
||||
- action: switch.turn_on
|
||||
entity_id:
|
||||
- switch.utility_room_vent_switch
|
||||
turn_off:
|
||||
action: switch.turn_off
|
||||
entity_id: switch.utility_room_vent_switch
|
||||
- action: switch.turn_off
|
||||
entity_id:
|
||||
- switch.utility_room_vent_switch
|
||||
default_entity_id: fan.utility_room_vent
|
||||
name: Utility Room Vent
|
||||
state: "{{ states('switch.utility_room_vent_switch') }}"
|
||||
|
||||
bathroom_vent:
|
||||
unique_id: templatefan.bathroom_vent
|
||||
friendly_name: "Bathroom Vent"
|
||||
value_template: "{{ states('switch.bathroom_vent_switch') }}"
|
||||
- unique_id: templatefan.bathroom_vent
|
||||
turn_on:
|
||||
action: switch.turn_on
|
||||
entity_id: switch.bathroom_vent_switch
|
||||
- action: switch.turn_on
|
||||
entity_id:
|
||||
- switch.bathroom_vent_switch
|
||||
turn_off:
|
||||
action: switch.turn_off
|
||||
entity_id: switch.bathroom_vent_switch
|
||||
- action: switch.turn_off
|
||||
entity_id:
|
||||
- switch.bathroom_vent_switch
|
||||
default_entity_id: fan.bathroom_vent
|
||||
name: Bathroom Vent
|
||||
state: "{{ states('switch.bathroom_vent_switch') }}"
|
||||
|
||||
@@ -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) + }}"
|
||||
@@ -1,33 +0,0 @@
|
||||
platform: template
|
||||
sensors:
|
||||
mail_deliveries_message:
|
||||
friendly_name: "Deliveries Summary"
|
||||
value_template: >
|
||||
{# Deliveries Sentence #}
|
||||
{% macro deliveries_sentence() -%}
|
||||
{%- if states("sensor.mail_usps_mail")|int(0) == 0 -%}
|
||||
No
|
||||
{%- else -%}
|
||||
{{states("sensor.mail_usps_mail")|int(0)}}
|
||||
{%- endif -%}
|
||||
{{' '}}
|
||||
{%- if states("sensor.mail_usps_mail")|int(0) <= 1 -%}
|
||||
mail
|
||||
{%- else -%}
|
||||
pieces of mail
|
||||
{%- endif -%}
|
||||
{{' '}}will be delivered.{{' '}}
|
||||
{%- if states("sensor.mail_packages_in_transit")|int(0) == 0 -%}
|
||||
No
|
||||
{%- else -%}
|
||||
{{states("sensor.mail_packages_in_transit")|int(0)}}
|
||||
{%- endif -%}
|
||||
{{' '}}
|
||||
{%- if states("sensor.mail_packages_in_transit")|int(0) == 1 -%}
|
||||
package is
|
||||
{%- else -%}
|
||||
packages are
|
||||
{%- endif -%}
|
||||
{{' '}}in transit.{{' '}}
|
||||
{%- endmacro %}
|
||||
{{deliveries_sentence()}}
|
||||
@@ -1,21 +1,22 @@
|
||||
platform: template
|
||||
sensors:
|
||||
sun_elevation:
|
||||
unique_id: templatesensor.sun_elevation
|
||||
value_template: "{{ state_attr('sun.sun', 'elevation') }}"
|
||||
unit_of_measurement: "degrees"
|
||||
icon_template: >
|
||||
template:
|
||||
- sensor:
|
||||
- unique_id: templatesensor.sun_elevation
|
||||
unit_of_measurement: degrees
|
||||
default_entity_id: sensor.sun_elevation
|
||||
icon: >
|
||||
{% set elevation = state_attr('sun.sun', 'elevation')|default(0) %}
|
||||
{% if elevation > 0 %}
|
||||
mdi:weather-sunny
|
||||
mdi:weather-sunny
|
||||
{% else %}
|
||||
mdi:weather-night
|
||||
{% endif %}
|
||||
state: '{{ state_attr("sun.sun", "elevation") }}'
|
||||
name: sun_elevation
|
||||
|
||||
period_of_day:
|
||||
unique_id: templatesensor.period_of_day
|
||||
friendly_name: Period of the Day
|
||||
value_template: >-
|
||||
- unique_id: templatesensor.period_of_day
|
||||
default_entity_id: sensor.period_of_day
|
||||
name: Period of the Day
|
||||
state: >-
|
||||
{% if (as_timestamp(states.sun.sun.attributes.next_dusk)) - (as_timestamp(states.sun.sun.attributes.next_setting)) < 0 %}
|
||||
Dusk
|
||||
{% elif (as_timestamp(states.sun.sun.attributes.next_rising)) - (as_timestamp(states.sun.sun.attributes.next_dawn)) < 0 %}
|
||||
@@ -24,4 +25,14 @@ sensors:
|
||||
Night
|
||||
{% else %}
|
||||
Day
|
||||
{% endif %}
|
||||
icon: >
|
||||
{% if is_state("sensor.period_of_day", "Dawn") %}
|
||||
mdi:weather-sunset-up
|
||||
{% elif is_state("sensor.period_of_day", "Dusk") %}
|
||||
mdi:weather-sunset-down
|
||||
{% elif is_state("sensor.period_of_day", "Night") %}
|
||||
mdi:moon-waxing-crescent
|
||||
{% elif is_state("sensor.period_of_day", "Day") %}
|
||||
mdi:weather-sunny
|
||||
{% endif %}
|
||||
@@ -1,251 +0,0 @@
|
||||
platform: template
|
||||
sensors:
|
||||
hvac_filter_next_change:
|
||||
unique_id: templatesensor.hvac_filter_next_change
|
||||
friendly_name: "HVAC Filter Next Change"
|
||||
value_template: "{{ strptime(states('input_datetime.filter_last_changed'), '%Y-%m-%d %H:%M:%S') + timedelta(days=90) }}"
|
||||
|
||||
hvac_mode:
|
||||
unique_id: templatesensor.hvac_mode
|
||||
value_template: '{{states("climate.thermostat")}}'
|
||||
friendly_name: HVAC Mode
|
||||
|
||||
hvac_equipment_running:
|
||||
unique_id: templatesensor.hvac_equipment_running
|
||||
value_template: '{{state_attr("climate.thermostat", "equipment_running")|default("none", true)}}'
|
||||
friendly_name: HVAC Equipment Running
|
||||
|
||||
hvac_action:
|
||||
unique_id: templatesensor.hvac_action
|
||||
value_template: '{{state_attr("climate.thermostat", "hvac_action")}}'
|
||||
friendly_name: HVAC Action
|
||||
|
||||
clint_status:
|
||||
unique_id: templatesensor.clint_status
|
||||
value_template: '{{ states.input_select.clint_status_dropdown.state }}'
|
||||
friendly_name: 'Clint'
|
||||
|
||||
emmett_status:
|
||||
unique_id: templatesensor.emmett_status
|
||||
value_template: '{{ states.input_select.emmett_status_dropdown.state }}'
|
||||
friendly_name: 'Emmett'
|
||||
|
||||
bridget_status:
|
||||
unique_id: templatesensor.bridget_status
|
||||
value_template: '{{ states.input_select.bridget_status_dropdown.state }}'
|
||||
friendly_name: 'Bridget'
|
||||
|
||||
kristy_status:
|
||||
unique_id: templatesensor.kristy_status
|
||||
value_template: '{{ states.input_select.kristy_status_dropdown.state }}'
|
||||
friendly_name: 'Kristy'
|
||||
|
||||
marshall_status:
|
||||
unique_id: templatesensor.marshall_status
|
||||
value_template: '{{ states.input_select.marshall_status_dropdown.state }}'
|
||||
friendly_name: 'Marshall'
|
||||
|
||||
tess_status:
|
||||
unique_id: templatesensor.tess_status
|
||||
value_template: '{{ states.input_select.tess_status_dropdown.state }}'
|
||||
friendly_name: 'Tess'
|
||||
|
||||
ebin_status:
|
||||
unique_id: templatesensor.ebin_status
|
||||
value_template: '{{ states.input_select.ebin_status_dropdown.state }}'
|
||||
friendly_name: 'Ebin'
|
||||
|
||||
people_count:
|
||||
unique_id: templatesensor.people_count
|
||||
friendly_name: 'People Count'
|
||||
value_template: >
|
||||
{{[ 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}}
|
||||
|
||||
count_automations:
|
||||
unique_id: templatesensor.count_automations
|
||||
value_template: "{{ states.automation | list | length }}"
|
||||
|
||||
count_scripts:
|
||||
unique_id: templatesensor.count_scripts
|
||||
value_template: "{{ states.script | list | length }}"
|
||||
|
||||
count_device_trackers:
|
||||
unique_id: templatesensor.count_device_trackers
|
||||
value_template: "{{ states.device_tracker | list | length }}"
|
||||
|
||||
count_binary_sensors:
|
||||
unique_id: templatesensor.count_binary_sensors
|
||||
value_template: "{{ states.binary_sensor | list | length }}"
|
||||
|
||||
count_sensors:
|
||||
unique_id: templatesensor.count_sensors
|
||||
value_template: "{{ states.sensor | list | length }}"
|
||||
|
||||
count_switches:
|
||||
unique_id: templatesensor.count_switches
|
||||
value_template: "{{ states.switch | list | length }}"
|
||||
|
||||
count_zones:
|
||||
unique_id: templatesensor.count_zones
|
||||
value_template: "{{ states.zone | list | length }}"
|
||||
|
||||
count_input_booleans:
|
||||
unique_id: templatesensor.count_input_booleans
|
||||
value_template: "{{ states.input_boolean | list | length }}"
|
||||
|
||||
count_input_numbers:
|
||||
unique_id: templatesensor.count_input_numbers
|
||||
value_template: "{{ states.input_number | list | length }}"
|
||||
|
||||
count_input_texts:
|
||||
unique_id: templatesensor.count_input_texts
|
||||
value_template: "{{ states.input_text | list | length }}"
|
||||
|
||||
count_input_selects:
|
||||
unique_id: templatesensor.count_input_selects
|
||||
value_template: "{{ states.input_select | list | length }}"
|
||||
|
||||
count_input_datetimes:
|
||||
unique_id: templatesensor.count_input_datetimes
|
||||
value_template: "{{ states.input_datetime | list | length }}"
|
||||
|
||||
steam1_game:
|
||||
unique_id: templatesensor.steam1_game
|
||||
value_template: >-
|
||||
{% if state_attr('sensor.steam_76561197960668089', 'game') is not none%}
|
||||
{{ state_attr('sensor.steam_76561197960668089', 'game') }}
|
||||
{% else %}
|
||||
{{ states('sensor.steam_76561197960668089') }}
|
||||
{% endif %}
|
||||
|
||||
nonsummer_per_kwh:
|
||||
friendly_name: 'Non-Summer Rate'
|
||||
unique_id: templatesensor.non_summer_per_kwh
|
||||
value_template: 0.100496
|
||||
icon_template: mdi:currency-usd
|
||||
unit_of_measurement: '$/kWh'
|
||||
|
||||
summernonpeak_per_kwh:
|
||||
friendly_name: 'Summer Non-Peak Rate'
|
||||
unique_id: templatesensor.summer_nonpeak_per_kwh
|
||||
value_template: 0.100649
|
||||
icon_template: mdi:currency-usd
|
||||
unit_of_measurement: '$/kWh'
|
||||
|
||||
summerpeak_per_kwh:
|
||||
friendly_name: 'Summer Peak Rate'
|
||||
unique_id: templatesensor.summerpeak_per_kwh
|
||||
value_template: 0.149656
|
||||
icon_template: mdi:currency-usd
|
||||
unit_of_measurement: '$/kWh'
|
||||
|
||||
energy_cost:
|
||||
unique_id: templatesensor.energy_cost
|
||||
friendly_name: 'Energy Cost'
|
||||
value_template: >-
|
||||
{% 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_template: mdi:currency-usd
|
||||
unit_of_measurement: '$/kWh'
|
||||
|
||||
energy_tariff:
|
||||
unique_id: templatesensor.energy_tariff
|
||||
friendly_name: 'Energy Tariff'
|
||||
value_template: >-
|
||||
{% 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 %}
|
||||
|
||||
general_waste:
|
||||
unique_id: templatesensor.general_waste
|
||||
friendly_name: 'General Waste'
|
||||
icon_template: mdi:trash-can
|
||||
value_template: >-
|
||||
{% if is_state('calendar.trash_schedule','on') %}
|
||||
today
|
||||
{% elif state_attr('calendar.trash_schedule','offset_reached') %}
|
||||
tomorrow
|
||||
{% else %}
|
||||
future
|
||||
{% endif %}
|
||||
|
||||
# monitored_daily_kwh:
|
||||
# unique_id: templatesensor.monitored_daily_kwh
|
||||
# friendly_name: 'Monitored Daily [kWh]'
|
||||
# icon_template: mdi:flash
|
||||
# unit_of_measurement: kWh
|
||||
# value_template: "{{ states('sensor.basement_and_laundry_lights_and_plugs_kwh')|float(default=0) + }}"
|
||||
|
||||
#my_room_status
|
||||
occupied_room_count:
|
||||
unique_id: temlatesensor.occupied_room_count
|
||||
friendly_name: Rooms Occupied
|
||||
value_template: "{{ (expand('group.my_room_status') | selectattr('state', 'eq', 'on')) | list | count |int(default=0) }}"
|
||||
icon_template: "{{ iif(is_state('group.my_room_status', 'on'), 'mdi:floor-plan','mdi:floor-plan') }}"
|
||||
|
||||
speakers_on_count:
|
||||
unique_id: temlatesensor.speakers_on_count
|
||||
friendly_name: Speakers On
|
||||
value_template: "{{ (expand('group.all_my_speakers') | selectattr('state', 'eq', 'playing')) | list | count |int(default=0) }}"
|
||||
icon_template: "{{ iif(is_state('group.all_my_speakers', 'on'), 'mdi:speaker-multiple','mdi:speaker-off') }}"
|
||||
|
||||
lights_on_count:
|
||||
unique_id: temlatesensor.lights_on_count
|
||||
friendly_name: Lights On
|
||||
value_template: "{{ (expand('group.my_lights') | selectattr('state', 'eq', 'on')) | list | count |int(default=0) }}"
|
||||
icon_template: "{{ iif(is_state('group.my_lights', 'on'), 'mdi:lightbulb-group','mdi:lightbulb-group-off') }}"
|
||||
|
||||
open_windows_count:
|
||||
unique_id: temlatesensor.open_windows_count
|
||||
friendly_name: Open Windows
|
||||
value_template: "{{ (expand('group.my_exterior_windows') | selectattr('state', 'eq', 'on')) | list | count |int(default=0) }}"
|
||||
icon_template: "{{ iif(is_state('group.my_exterior_windows', 'on'), 'mdi:window-open-variant','mdi:window-closed-variant') }}"
|
||||
|
||||
open_external_doors_count:
|
||||
unique_id: temlatesensor.open_external_doors_count
|
||||
friendly_name: Open External Doors
|
||||
value_template: "{{ (expand('group.my_exterior_doors') | selectattr('state', 'eq', 'on')) | list | count |int(default=0) }}"
|
||||
icon_template: "{{ iif(is_state('group.my_exterior_windows', 'on'), 'mdi:door-open','mdi:door') }}"
|
||||
|
||||
frigate_person_count:
|
||||
unique_id: temlatesensor.frigate_person_count
|
||||
friendly_name: Frigate Person Count
|
||||
value_template: "{{
|
||||
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_template: mdi:human-queue
|
||||
@@ -1,31 +1,31 @@
|
||||
platform: template
|
||||
switches:
|
||||
thermostat_fan_mode:
|
||||
unique_id: templateswitch.thermostat_fan_mode
|
||||
template:
|
||||
- switch:
|
||||
- unique_id: 9d2081d6-6ae2-4e51-81d3-cd8679905de8
|
||||
# This shouldn't be used because it just re-circulates the air in the house.
|
||||
# Since there aren't any returns in the basement, the upstairs air recirculates itself
|
||||
# which accomplishes nothing
|
||||
# I'd need to get some kind of fresh air intake and a damper
|
||||
friendly_name: "Thermostat Fan Mode"
|
||||
value_template: >-
|
||||
turn_on:
|
||||
- action: ecobee.set_fan_min_on_time
|
||||
data:
|
||||
fan_min_on_time: 60
|
||||
turn_off:
|
||||
- action: ecobee.set_fan_min_on_time
|
||||
data:
|
||||
fan_min_on_time: 0
|
||||
default_entity_id: switch.thermostat_fan_mode
|
||||
name: Thermostat Fan Mode
|
||||
state: >-
|
||||
{% if state_attr('climate.thermostat', 'fan_min_on_time') | int(default=0) < 5 %}
|
||||
{{'false'}}
|
||||
{% else %}
|
||||
{{ 'true' }}
|
||||
{% endif %}
|
||||
turn_on:
|
||||
- action: ecobee.set_fan_min_on_time
|
||||
data:
|
||||
fan_min_on_time: 60
|
||||
turn_off:
|
||||
- action: ecobee.set_fan_min_on_time
|
||||
data:
|
||||
fan_min_on_time: 0
|
||||
|
||||
master_bedroom_light_cycle:
|
||||
unique_id: templateswitch.master_bedroom_light_cycle
|
||||
friendly_name: "Master Bedroom Light Cycle"
|
||||
value_template: "{{ is_state('input_boolean.master_bedroom_light_cycle', 'on') }}"
|
||||
- unique_id: 81b29c14-23e0-4215-a3dd-21a52564d44e
|
||||
default_entity_id: switch.master_bedroom_light_cycle
|
||||
name: "Master Bedroom Light Cycle"
|
||||
state: "{{ is_state('input_boolean.master_bedroom_light_cycle', 'on') }}"
|
||||
turn_on:
|
||||
action: input_boolean.turn_on
|
||||
data:
|
||||
@@ -34,36 +34,55 @@ switches:
|
||||
action: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.master_bedroom_light_cycle
|
||||
icon_template: >-
|
||||
icon: >-
|
||||
{% if is_state('input_boolean.master_bedroom_light_cycle', 'on') %}
|
||||
mdi:party-popper
|
||||
{% else %}
|
||||
mdi:party-popper
|
||||
{% endif %}
|
||||
|
||||
nursery_light_cycle:
|
||||
unique_id: templateswitch.nursery_light_cycle
|
||||
friendly_name: "Nursery Light Cycle"
|
||||
value_template: "{{ is_state('input_boolean.nursery_light_cycle', 'on') }}"
|
||||
- unique_id: 000baf7e-3065-432e-a3eb-e4f1d40f8028
|
||||
default_entity_id: switch.girls_room_light_cycle
|
||||
name: "Girls Room Light Cycle"
|
||||
state: "{{ is_state('input_boolean.girls_room_light_cycle', 'on') }}"
|
||||
turn_on:
|
||||
action: input_boolean.turn_on
|
||||
data:
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
entity_id: input_boolean.girls_room_light_cycle
|
||||
turn_off:
|
||||
action: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
icon_template: >-
|
||||
{% if is_state('input_boolean.nursery_light_cycle', 'on') %}
|
||||
entity_id: input_boolean.girls_room_light_cycle
|
||||
icon: >-
|
||||
{% if is_state('input_boolean.girls_room_light_cycle', 'on') %}
|
||||
mdi:party-popper
|
||||
{% else %}
|
||||
mdi:party-popper
|
||||
{% endif %}
|
||||
|
||||
front_room_light_cycle:
|
||||
unique_id: templateswitch.front_room_light_cycle
|
||||
friendly_name: "Front Room Light Cycle"
|
||||
value_template: "{{ is_state('input_boolean.front_room_light_cycle', 'on') }}"
|
||||
- unique_id: bbdb494c-2ec9-4840-a1e9-c20268136ebb
|
||||
default_entity_id: switch.boys_room_light_cycle
|
||||
name: "Boys Room Light Cycle"
|
||||
state: "{{ is_state('input_boolean.boys_room_light_cycle', 'on') }}"
|
||||
turn_on:
|
||||
action: input_boolean.turn_on
|
||||
data:
|
||||
entity_id: input_boolean.boys_room_light_cycle
|
||||
turn_off:
|
||||
action: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.boys_room_light_cycle
|
||||
icon: >-
|
||||
{% if is_state('input_boolean.boys_room_light_cycle', 'on') %}
|
||||
mdi:party-popper
|
||||
{% else %}
|
||||
mdi:party-popper
|
||||
{% endif %}
|
||||
|
||||
- unique_id: 267f9562-7fcd-42cd-aa8d-b801b1a18ffc
|
||||
default_entity_id: switch.front_room_light_cycle
|
||||
name: "Front Room Light Cycle"
|
||||
state: "{{ is_state('input_boolean.front_room_light_cycle', 'on') }}"
|
||||
turn_on:
|
||||
action: input_boolean.turn_on
|
||||
data:
|
||||
@@ -72,17 +91,17 @@ switches:
|
||||
action: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.front_room_light_cycle
|
||||
icon_template: >-
|
||||
icon: >-
|
||||
{% if is_state('input_boolean.front_room_light_cycle', 'on') %}
|
||||
mdi:party-popper
|
||||
{% else %}
|
||||
mdi:party-popper
|
||||
{% endif %}
|
||||
|
||||
great_room_light_cycle:
|
||||
unique_id: templateswitch.great_room_light_cycle
|
||||
friendly_name: "Great Room Light Cycle"
|
||||
value_template: "{{ is_state('input_boolean.great_room_light_cycle', 'on') }}"
|
||||
- unique_id: fff0f6b6-dfcf-4bda-b21e-1cf1ef385cd1
|
||||
default_entity_id: switch.great_room_light_cycle
|
||||
name: "Great Room Light Cycle"
|
||||
state: "{{ is_state('input_boolean.great_room_light_cycle', 'on') }}"
|
||||
turn_on:
|
||||
action: input_boolean.turn_on
|
||||
data:
|
||||
@@ -91,17 +110,17 @@ switches:
|
||||
action: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.great_room_light_cycle
|
||||
icon_template: >-
|
||||
icon: >-
|
||||
{% if is_state('input_boolean.great_room_light_cycle', 'on') %}
|
||||
mdi:party-popper
|
||||
{% else %}
|
||||
mdi:party-popper
|
||||
{% endif %}
|
||||
|
||||
computer_area_light_cycle:
|
||||
unique_id: templateswitch.computer_area_light_cycle
|
||||
friendly_name: "Computer Area Light Cycle"
|
||||
value_template: "{{ is_state('input_boolean.computer_area_light_cycle', 'on') }}"
|
||||
- unique_id: fc8be266-37ce-4eac-a2c5-2398f84681bb
|
||||
default_entity_id: switch.computer_area_light_cycle
|
||||
name: "Computer Area Light Cycle"
|
||||
state: "{{ is_state('input_boolean.computer_area_light_cycle', 'on') }}"
|
||||
turn_on:
|
||||
action: input_boolean.turn_on
|
||||
data:
|
||||
@@ -110,16 +129,16 @@ switches:
|
||||
action: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.computer_area_light_cycle
|
||||
icon_template: >-
|
||||
icon: >-
|
||||
{% if is_state('input_boolean.computer_area_light_cycle', 'on') %}
|
||||
mdi:party-popper
|
||||
{% else %}
|
||||
mdi:party-popper
|
||||
{% endif %}
|
||||
|
||||
nursery_bed_lights:
|
||||
unique_id: templateswitch.nursery_bed_lights
|
||||
value_template: "{{ is_state('light.black_bed_wled', 'on') or is_state('light.white_bed_wled', 'on') }}"
|
||||
- unique_id: be11d0e0-4858-4381-8528-23c16179bbe3
|
||||
default_entity_id: switch.nursery_bed_lights
|
||||
state: "{{ is_state('light.black_bed_wled', 'on') or is_state('light.white_bed_wled', 'on') }}"
|
||||
turn_on:
|
||||
action: select.select_option
|
||||
target:
|
||||
@@ -136,12 +155,12 @@ switches:
|
||||
- select.white_bed_wled_preset
|
||||
data:
|
||||
option: "Off"
|
||||
icon_template: >-
|
||||
icon: >-
|
||||
mdi:led-strip-variant
|
||||
|
||||
virtual_reality:
|
||||
unique_id: templateswitch.virtual_reality
|
||||
value_template: "{{ is_state('switch.vr_headset_plug', 'on') }}"
|
||||
- unique_id: 5cba4cb3-1fa0-482f-b419-edde77030500
|
||||
default_entity_id: switch.virtual_reality
|
||||
state: "{{ is_state('switch.vr_headset_plug', 'on') }}"
|
||||
turn_on:
|
||||
action: homeassistant.turn_on
|
||||
data:
|
||||
@@ -152,12 +171,12 @@ switches:
|
||||
data:
|
||||
entity_id:
|
||||
- switch.vr_headset_plug
|
||||
icon_template: >-
|
||||
icon: >-
|
||||
mdi:virtual-reality
|
||||
|
||||
# all_chores:
|
||||
# unique_id: templateswitch.all_chores
|
||||
# value_template: "{{ is_state('input_boolean.grocy_next_chores', 'on')}}"
|
||||
# state: "{{ is_state('input_boolean.grocy_next_chores', 'on')}}"
|
||||
# turn_on:
|
||||
# action: homeassistant.turn_on
|
||||
# data:
|
||||
@@ -171,7 +190,7 @@ switches:
|
||||
|
||||
# boys_room_chores:
|
||||
# unique_id: templateswitch.boys_room_chores
|
||||
# value_template: "{{ is_state('input_boolean.boys_room_next_chores', 'on')}}"
|
||||
# state: "{{ is_state('input_boolean.boys_room_next_chores', 'on')}}"
|
||||
# turn_on:
|
||||
# action: homeassistant.turn_on
|
||||
# data:
|
||||
@@ -185,7 +204,7 @@ switches:
|
||||
|
||||
# computer_area_chores:
|
||||
# unique_id: templateswitch.computer_area_chores
|
||||
# value_template: "{{ is_state('input_boolean.computer_area_next_chores', 'on')}}"
|
||||
# state: "{{ is_state('input_boolean.computer_area_next_chores', 'on')}}"
|
||||
# turn_on:
|
||||
# action: homeassistant.turn_on
|
||||
# data:
|
||||
|
||||
Reference in New Issue
Block a user