mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
4e0e55ac3c
- Updated nursery automation to use input booleans for bed occupancy instead of binary sensors. - Changed conditions in nursery automation to improve readability and consistency. - Modified binary sensor configurations for master bedroom and nursery to use input booleans. - Removed unused input number configurations related to master bed load cells. - Updated UI configurations to reflect changes in entity types from binary sensors to input booleans. - Cleaned up camera view configurations and adjusted styles for better layout. - Removed deprecated master bed YAML configuration and archived it for future reference. - Enhanced ESPHome configurations for white and black beds, including improved logging and diagnostics.
746 lines
33 KiB
YAML
746 lines
33 KiB
YAML
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('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.fineoffset_wh51_00f935_moisture')|float(default=0) <= states('input_number.double_planter_water_alert')|int(default=0) }}"
|
|
delay_on: "00:05:00"
|
|
icon_template: >
|
|
{% if states('sensor.fineoffset_wh51_00f935_moisture') == 'unavailable' %}
|
|
mdi:flower-outline
|
|
{% else %}
|
|
mdi:flower
|
|
{% endif %}
|
|
attribute_templates:
|
|
moisture: "{{states('sensor.fineoffset_wh51_00f935_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.acurite_986_1r_48226_temperature')|int(default=0) > states('input_number.kitchen_fridge_alert')|int(default=0) }}"
|
|
delay_on: "00:30:00"
|
|
icon_template: >
|
|
{% if states('sensor.acurite_986_1r_48226_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.acurite_986_2f_42383_temperature')|int(default=0) > states('input_number.kitchen_freezer_alert')|int(default=0) }}"
|
|
delay_on: "00:30:00"
|
|
icon_template: >
|
|
{% if states('sensor.acurite_986_2f_42383_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.acurite_986_1r_48226_temperature')|int(default=0) > states('input_number.kitchen_fridge_alert')|int(default=0) or states('sensor.acurite_986_2f_42383_temperature')|int(default=0) > states('input_number.kitchen_freezer_alert')|int(default=0) }}"
|
|
delay_on: "00:30:00"
|
|
icon_template: >
|
|
{% if states('sensor.acurite_986_1r_48226_temperature')|int(default=0) > states('input_number.kitchen_fridge_alert')|int(default=0) or states('sensor.acurite_986_2f_42383_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('input_boolean.master_bed_occupied','on') and is_state('person.kristy','home') }}"
|
|
|
|
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('input_boolean.master_bed_occupied','on') }}"
|
|
|
|
bathroom_getting_humid:
|
|
unique_id: templatebinarysensor.bathroom_getting_humid
|
|
friendly_name: Bathroom Getting Humid
|
|
delay_off:
|
|
minutes: 5
|
|
#value_template: "{{ is_state('binary_sensor.trend_bathroom_humidity','on') or states('sensor.master_bathroom_thermostat_humidity') | int(default=0) - states('sensor.master_bedroom_multisensor_humidity') | int(default=100) > 5}}"
|
|
value_template: "{{ states('sensor.master_bathroom_thermostat_humidity') | float(default=0) - states('sensor.upstairs_mean_humidity') | float(default=100) > 10 }}"
|
|
icon_template: >
|
|
{% if states('sensor.master_bathroom_thermostat_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.master_bathroom_thermostat_humidity') | float(default=0) }}"
|
|
mean_humidity: "{{ states('sensor.upstairs_mean_humidity') | float(default=0) }}"
|
|
difference: "{{ states('sensor.master_bathroom_thermostat_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') | int(default=0) >= -5 %}
|
|
{{'true'}}
|
|
{% elif is_state_attr('climate.thermostat', 'hvac_action', 'heating') and states('sensor.hvac_delta') | 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_temperature") | string != "unknown" and states("sensor.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') | 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') | 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_temperature") | string == 'unknown' or states("sensor.return_temperature") | string == 'unknown' or states("sensor.hvac_temperature") | string == 'unavailable' or states("sensor.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.lacrosse_tx141thbv2_0_54_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.lacrosse_tx141thbv2_0_54_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 %}
|
|
|
|
green_car_east_side:
|
|
unique_id: templatebinarysensor.green_car_east_side
|
|
friendly_name: Green Car East Side
|
|
value_template: "{{ states('sensor.car_sensor_east_side') | float(default=0) >= 1.3 and states('sensor.car_sensor_east_side') | float(default=0) <= 1.5 }}"
|
|
|
|
green_car_west_side:
|
|
unique_id: templatebinarysensor.green_car_west_side
|
|
friendly_name: Green Car West Side
|
|
value_template: "{{ states('sensor.car_sensor_west_side') | float(default=0) >= 1.3 and states('sensor.car_sensor_west_side') | float(default=0) <= 1.5 }}"
|
|
|
|
gray_suv_east_side:
|
|
unique_id: templatebinarysensor.gray_suv_east_side
|
|
friendly_name: Gray SUV East Side
|
|
value_template: "{{ states('sensor.car_sensor_east_side') | float(default=0) >= 0.8 and states('sensor.car_sensor_east_side') | float(default=0) < 1.8 }}"
|
|
|
|
gray_suv_west_side:
|
|
unique_id: templatebinarysensor.gray_suv_west_side
|
|
friendly_name: Gray SUV West Side
|
|
value_template: "{{ states('sensor.car_sensor_west_side') | float(default=0) >= 0.8 and states('sensor.car_sensor_west_side') | float(default=0) < 1.8 }}"
|
|
|
|
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
|
|
|
|
blue_room_light_left_on:
|
|
unique_id: templatebinarysensor.blue_room_light_left_on
|
|
friendly_name: Blue Room Light Left On
|
|
value_template: "{{ is_state('light.blue_room_hue','on') }}"
|
|
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') }}"
|
|
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_ceiling_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_ceiling_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.salt_level_in_bags','0') }}"
|
|
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.black_bed_occupied') }}"
|
|
icon_template: "{{ iif(is_state('binary_sensor.black_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('input_boolean.white_bed_occupied') }}"
|
|
icon_template: "{{ iif(is_state('input_boolean.white_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
|