mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
why keep track any more?
This commit is contained in:
@@ -8,6 +8,12 @@ trigger:
|
||||
at:
|
||||
entity_id: input_datetime.clint_next_alarm
|
||||
offset: "-300"
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: "on"
|
||||
|
||||
action:
|
||||
- action: input_boolean.turn_off
|
||||
data:
|
||||
@@ -21,8 +27,9 @@ action:
|
||||
|
||||
- action: media_player.volume_set
|
||||
data:
|
||||
entity_id: media_player.ma_home_assistant_voice_097b44_media_player
|
||||
volume_level: 0.60
|
||||
#entity_id: media_player.ma_home_assistant_voice_097b44_media_player
|
||||
entity_id: media_player.ma_master_bedroom_clock
|
||||
volume_level: 0.90
|
||||
|
||||
- action: input_select.select_option
|
||||
data:
|
||||
@@ -32,7 +39,8 @@ action:
|
||||
|
||||
- action: music_assistant.play_media
|
||||
target:
|
||||
entity_id: media_player.ma_home_assistant_voice_097b44_media_player
|
||||
#entity_id: media_player.ma_home_assistant_voice_097b44_media_player
|
||||
entity_id: media_player.ma_master_bedroom_clock
|
||||
data:
|
||||
media_type: playlist
|
||||
#media_id: library://playlist/7
|
||||
|
||||
@@ -9,7 +9,7 @@ trigger:
|
||||
action:
|
||||
- action: script.search_and_play_playlist
|
||||
data:
|
||||
speaker: media_player.ma_home_assistant_voice_097b44_media_player
|
||||
speaker: media_player.ma_master_bedroom_clock
|
||||
search_term: CleverThunderstorm
|
||||
volume: 0.25
|
||||
repeat: all
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -12,6 +12,7 @@ packages:
|
||||
network: !include common/wifi.yaml
|
||||
device_base: !include common/device_base.yaml
|
||||
bme680: !include common/bme680.yaml
|
||||
too_humid: !include common/binary_sensor/too_humid.yaml
|
||||
|
||||
esphome:
|
||||
name: ${devicename}
|
||||
|
||||
@@ -39,13 +39,13 @@ packages:
|
||||
- esphome-common/bluetooth-proxy.yaml
|
||||
|
||||
binary_sensor:
|
||||
- id: !remove bed_presence_status
|
||||
- id: !remove local_status_sensor
|
||||
|
||||
button:
|
||||
- id: !remove btn_restart
|
||||
- id: !remove local_restart_button
|
||||
|
||||
sensor:
|
||||
- id: !remove bed_presence_uptime
|
||||
- id: !remove local_uptime_sensor
|
||||
# See https://github.com/ElevatedSensors/sensor-configs/blob/main/bed-presence-mk1/sensor.yaml for a detailed
|
||||
# description of available substitutions.
|
||||
#
|
||||
|
||||
@@ -8,7 +8,7 @@ substitutions:
|
||||
static_ip: !secret circuit-sensor-ip
|
||||
|
||||
packages:
|
||||
network: !include common/waveshare_esp32_s3_eth.yaml
|
||||
network: !include common/waveshare_esp32_s3_wifi.yaml
|
||||
device_base: !include common/device_base.yaml
|
||||
web_server: !include common/web_server.yaml
|
||||
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
platform: status
|
||||
name: "Status"
|
||||
binary_sensor:
|
||||
- platform: status
|
||||
name: "Status"
|
||||
id: local_status_sensor
|
||||
@@ -0,0 +1,35 @@
|
||||
number:
|
||||
- platform: template
|
||||
name: High Humidity Trigger
|
||||
id: val_humidity
|
||||
icon: mdi:gauge-full
|
||||
unit_of_measurement: '%'
|
||||
entity_category: config
|
||||
optimistic: True
|
||||
restore_value: True
|
||||
initial_value: 70
|
||||
min_value: 0
|
||||
max_value: 100
|
||||
step: 1.0
|
||||
mode: box
|
||||
|
||||
- platform: template
|
||||
name: Humidity Change Trigger
|
||||
id: val_derivative
|
||||
icon: mdi:gauge-full
|
||||
unit_of_measurement: ''
|
||||
entity_category: config
|
||||
optimistic: True
|
||||
restore_value: True
|
||||
initial_value: 2.0
|
||||
min_value: -10.0
|
||||
max_value: 10.0
|
||||
step: .01
|
||||
mode: box
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
name: Too Humid
|
||||
id: too_humid
|
||||
device_class: moisture
|
||||
lambda: return id(relative_humidity).state >= id(val_humidity).state or id(relative_humidity_change).state >= id(val_derivative).state;
|
||||
@@ -67,7 +67,10 @@ sensor:
|
||||
id: temperature
|
||||
internal: true
|
||||
sample_rate: lp
|
||||
unit_of_measurement: "°C"
|
||||
unit_of_measurement: "°F"
|
||||
# Converting to farenheit here, to avoid decimals when viewing the sensor in home assistant
|
||||
filters:
|
||||
- lambda: return round( (x * (9.0/5.0) + 32.0) * 100.0) / 100.0;
|
||||
web_server:
|
||||
sorting_weight: 11
|
||||
sorting_group_id: sorting_group_temperature_settings
|
||||
@@ -149,13 +152,18 @@ sensor:
|
||||
- platform: copy
|
||||
source_id: temperature
|
||||
device_class: temperature
|
||||
unit_of_measurement: "°C"
|
||||
unit_of_measurement: "°F"
|
||||
name: "Air Temperature"
|
||||
id: air_temperature
|
||||
filters:
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
- lambda: 'return round( x * 10.0) / 10.0;'
|
||||
web_server:
|
||||
sorting_weight: 12
|
||||
sorting_group_id: sorting_group_temperature_settings
|
||||
@@ -165,8 +173,9 @@ sensor:
|
||||
- platform: copy
|
||||
source_id: temperature
|
||||
device_class: temperature
|
||||
unit_of_measurement: "°C/m"
|
||||
unit_of_measurement: "°F/m"
|
||||
name: "Air Temperature Change"
|
||||
id: air_temperature_change
|
||||
icon: mdi:chart-line
|
||||
disabled_by_default: true
|
||||
filters:
|
||||
@@ -182,7 +191,10 @@ sensor:
|
||||
float change = ( ( x - last_value ) / ( time - last_time ) ) *1000*5;
|
||||
last_value = x;
|
||||
last_time = time;
|
||||
return change;
|
||||
return round( change * 100.0) / 100.0;
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
@@ -196,11 +208,16 @@ sensor:
|
||||
device_class: humidity
|
||||
unit_of_measurement: "%"
|
||||
name: "Relative Humidity"
|
||||
id: relative_humidity
|
||||
filters:
|
||||
- round: 2
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_weight: 22
|
||||
sorting_group_id: sorting_group_humidity_settings
|
||||
@@ -210,6 +227,7 @@ sensor:
|
||||
device_class: humidity
|
||||
unit_of_measurement: "%/m"
|
||||
name: "Relative Humidity Change"
|
||||
id: relative_humidity_change
|
||||
icon: mdi:chart-line
|
||||
disabled_by_default: true
|
||||
filters:
|
||||
@@ -222,14 +240,18 @@ sensor:
|
||||
last_time = time;
|
||||
return {};
|
||||
}
|
||||
float change = ( ( x - last_value ) / ( time - last_time ) ) *1000*5;
|
||||
float change = ( ( x - last_value ) / ( time - last_time ) ) *1000*10;
|
||||
last_value = x;
|
||||
last_time = time;
|
||||
return change;
|
||||
- round: 2
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_weight: 23
|
||||
sorting_group_id: sorting_group_humidity_settings
|
||||
@@ -243,6 +265,10 @@ sensor:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- round: 2
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_group_id: sorting_group_pressure_settings
|
||||
|
||||
@@ -255,6 +281,10 @@ sensor:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- round: 2
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_group_id: sorting_group_pressure_settings
|
||||
|
||||
@@ -267,6 +297,10 @@ sensor:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- round: 2
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_group_id: sorting_group_quality_settings
|
||||
|
||||
@@ -279,6 +313,10 @@ sensor:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- round: 2
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_group_id: sorting_group_quality_settings
|
||||
|
||||
@@ -291,6 +329,10 @@ sensor:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- round: 2
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_group_id: sorting_group_quality_settings
|
||||
|
||||
|
||||
@@ -0,0 +1,371 @@
|
||||
web_server:
|
||||
port: 80
|
||||
version: 3
|
||||
include_internal: true
|
||||
sorting_groups:
|
||||
- id: sorting_group_temperature_settings
|
||||
name: "Temperature Settings"
|
||||
sorting_weight: 10
|
||||
- id: sorting_group_humidity_settings
|
||||
name: "Humidity Settings"
|
||||
sorting_weight: 20
|
||||
- id: sorting_group_pressure_settings
|
||||
name: "Pressure Settings"
|
||||
sorting_weight: 30
|
||||
- id: sorting_group_quality_settings
|
||||
name: "Quality Settings"
|
||||
sorting_weight: 40
|
||||
|
||||
|
||||
bme68x_bsec2_i2c:
|
||||
i2c_id: ${i2c_id}
|
||||
model: bme680
|
||||
|
||||
# i2c address
|
||||
# -----------
|
||||
# Common values are:
|
||||
# - 0x76
|
||||
# - 0x77
|
||||
# Default: 0x76
|
||||
address: 0x77
|
||||
|
||||
# Temperature offset
|
||||
# ------------------
|
||||
# Useful if device is in enclosure and reads too high
|
||||
# Default: 0
|
||||
temperature_offset: 0
|
||||
|
||||
# Sample rate
|
||||
# -----------
|
||||
# This controls the sampling rate for gas-dependant sensors and will govern the interval
|
||||
# at which the sensor heater is operated.
|
||||
# By default this rate will also be used for temperature, pressure and humidity sensors
|
||||
# but these can be overridden on a per-sensor level if required.
|
||||
#
|
||||
# Available options:
|
||||
# - lp (low power - samples every 3 seconds)
|
||||
# - ulp (ultra low power - samples every 5 minutes)
|
||||
# Default: lp
|
||||
sample_rate: lp
|
||||
|
||||
# Interval at which to save BSEC state
|
||||
# ------------------------------------
|
||||
# Default: 6h
|
||||
state_save_interval: 6h
|
||||
|
||||
sensor:
|
||||
- platform: bme68x_bsec2
|
||||
temperature:
|
||||
# Temperature in °C
|
||||
id: temperature
|
||||
internal: true
|
||||
sample_rate: lp
|
||||
unit_of_measurement: "°F"
|
||||
# Converting to farenheit here, to avoid decimals when viewing the sensor in home assistant
|
||||
filters:
|
||||
- lambda: return round( (x * (9.0/5.0) + 32.0) * 100.0) / 100.0;
|
||||
web_server:
|
||||
sorting_weight: 11
|
||||
sorting_group_id: sorting_group_temperature_settings
|
||||
|
||||
humidity:
|
||||
# Relative humidity %
|
||||
id: humidity
|
||||
internal: true
|
||||
sample_rate: lp
|
||||
unit_of_measurement: "%"
|
||||
web_server:
|
||||
sorting_weight: 21
|
||||
sorting_group_id: sorting_group_humidity_settings
|
||||
|
||||
pressure:
|
||||
# Pressure in hPa
|
||||
id: pressure
|
||||
internal: true
|
||||
sample_rate: lp
|
||||
unit_of_measurement: "hPa"
|
||||
web_server:
|
||||
sorting_weight: 31
|
||||
sorting_group_id: sorting_group_pressure_settings
|
||||
|
||||
gas_resistance:
|
||||
# Gas resistance in Ω
|
||||
id: resistance
|
||||
internal: true
|
||||
unit_of_measurement: "Ω"
|
||||
disabled_by_default: True
|
||||
web_server:
|
||||
sorting_weight: 41
|
||||
sorting_group_id: sorting_group_pressure_settings
|
||||
|
||||
iaq:
|
||||
# Indoor air quality value
|
||||
id: iaq
|
||||
internal: true
|
||||
unit_of_measurement: "AQI"
|
||||
web_server:
|
||||
sorting_weight: 51
|
||||
sorting_group_id: sorting_group_quality_settings
|
||||
|
||||
co2_equivalent:
|
||||
# CO2 equivalent estimate in ppm
|
||||
id: co2
|
||||
internal: true
|
||||
unit_of_measurement: "ppm"
|
||||
web_server:
|
||||
sorting_weight: 61
|
||||
sorting_group_id: sorting_group_quality_settings
|
||||
|
||||
breath_voc_equivalent:
|
||||
# Volatile organic compounds equivalent estimate in ppm
|
||||
id: breath_voc
|
||||
internal: true
|
||||
unit_of_measurement: "ppm"
|
||||
web_server:
|
||||
sorting_weight: 71
|
||||
sorting_group_id: sorting_group_quality_settings
|
||||
|
||||
iaq_accuracy:
|
||||
# IAQ accuracy as a numeric value of 0, 1, 2, 3
|
||||
name: "Numeric IAQ Accuracy"
|
||||
id: iaq_accuracy
|
||||
disabled_by_default: True
|
||||
web_server:
|
||||
sorting_weight: 81
|
||||
sorting_group_id: sorting_group_quality_settings
|
||||
filters:
|
||||
- median:
|
||||
window_size: 20
|
||||
send_every: 20
|
||||
send_first_at: 1
|
||||
|
||||
# These source sensors update every 3 seconds
|
||||
# An average with a window size of 10 and send_every of 10 means that an average is pushed out every 30 seconds
|
||||
|
||||
- platform: copy
|
||||
source_id: temperature
|
||||
device_class: temperature
|
||||
unit_of_measurement: "°F"
|
||||
name: "Air Temperature"
|
||||
id: air_temperature
|
||||
filters:
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
- lambda: 'return round( x * 10.0) / 10.0;'
|
||||
web_server:
|
||||
sorting_weight: 12
|
||||
sorting_group_id: sorting_group_temperature_settings
|
||||
|
||||
# These derivatives attempt to calculate the change per minute
|
||||
|
||||
- platform: copy
|
||||
source_id: temperature
|
||||
device_class: temperature
|
||||
unit_of_measurement: "°F/m"
|
||||
name: "Air Temperature Change"
|
||||
id: air_temperature_change
|
||||
icon: mdi:chart-line
|
||||
disabled_by_default: true
|
||||
filters:
|
||||
- lambda: |-
|
||||
static float last_value = 0;
|
||||
static float last_time = 0;
|
||||
float time = (float) millis();
|
||||
if (last_time == 0){
|
||||
last_value = x;
|
||||
last_time = time;
|
||||
return {};
|
||||
}
|
||||
float change = ( ( x - last_value ) / ( time - last_time ) ) *1000*5;
|
||||
last_value = x;
|
||||
last_time = time;
|
||||
return round( change * 100.0) / 100.0;
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
web_server:
|
||||
sorting_weight: 13
|
||||
sorting_group_id: sorting_group_temperature_settings
|
||||
|
||||
- platform: copy
|
||||
source_id: humidity
|
||||
device_class: humidity
|
||||
unit_of_measurement: "%"
|
||||
name: "Relative Humidity"
|
||||
id: relative_humidity
|
||||
filters:
|
||||
- round: 2
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_weight: 22
|
||||
sorting_group_id: sorting_group_humidity_settings
|
||||
|
||||
- platform: copy
|
||||
source_id: humidity
|
||||
device_class: humidity
|
||||
unit_of_measurement: "%/m"
|
||||
name: "Relative Humidity Change"
|
||||
id: relative_humidity_change
|
||||
icon: mdi:chart-line
|
||||
disabled_by_default: true
|
||||
filters:
|
||||
- lambda: |-
|
||||
static float last_value = 0;
|
||||
static float last_time = 0;
|
||||
float time = (float) millis();
|
||||
if (last_time == 0){
|
||||
last_value = x;
|
||||
last_time = time;
|
||||
return {};
|
||||
}
|
||||
float change = ( ( x - last_value ) / ( time - last_time ) ) *1000*10;
|
||||
last_value = x;
|
||||
last_time = time;
|
||||
return change;
|
||||
- round: 2
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_weight: 23
|
||||
sorting_group_id: sorting_group_humidity_settings
|
||||
|
||||
- platform: copy
|
||||
source_id: pressure
|
||||
unit_of_measurement: "hPa"
|
||||
name: "Pressure"
|
||||
filters:
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- round: 2
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_group_id: sorting_group_pressure_settings
|
||||
|
||||
- platform: copy
|
||||
source_id: resistance
|
||||
unit_of_measurement: "Ω"
|
||||
name: "Gas Resistance"
|
||||
filters:
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- round: 2
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_group_id: sorting_group_pressure_settings
|
||||
|
||||
- platform: copy
|
||||
source_id: iaq
|
||||
unit_of_measurement: "AQI"
|
||||
name: "Air Quality Index"
|
||||
filters:
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- round: 2
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_group_id: sorting_group_quality_settings
|
||||
|
||||
- platform: copy
|
||||
source_id: co2
|
||||
unit_of_measurement: "ppm"
|
||||
name: "CO2 Equivalent"
|
||||
filters:
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- round: 2
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_group_id: sorting_group_quality_settings
|
||||
|
||||
- platform: copy
|
||||
source_id: breath_voc
|
||||
unit_of_measurement: "ppm"
|
||||
name: "Breath VOC Equivalent"
|
||||
filters:
|
||||
- sliding_window_moving_average:
|
||||
window_size: 10
|
||||
send_every: 10
|
||||
send_first_at: 1
|
||||
- round: 2
|
||||
- or:
|
||||
- heartbeat: 60s
|
||||
- delta: 0.1
|
||||
web_server:
|
||||
sorting_group_id: sorting_group_quality_settings
|
||||
|
||||
text_sensor:
|
||||
- platform: template
|
||||
name: "IAQ Classification"
|
||||
icon: "mdi:checkbox-marked-circle-outline"
|
||||
web_server:
|
||||
sorting_weight: 60
|
||||
sorting_group_id: sorting_group_quality_settings
|
||||
lambda: |-
|
||||
if (int(id(iaq).state) <= 50) {
|
||||
return {"Excellent"};
|
||||
}
|
||||
else if (int(id(iaq).state) <= 100) {
|
||||
return {"Good"};
|
||||
}
|
||||
else if (int(id(iaq).state) <= 150) {
|
||||
return {"Lightly polluted"};
|
||||
}
|
||||
else if (int(id(iaq).state) <= 200) {
|
||||
return {"Moderately polluted"};
|
||||
}
|
||||
else if (int(id(iaq).state) <= 250) {
|
||||
return {"Heavily polluted"};
|
||||
}
|
||||
else if (int(id(iaq).state) <= 350) {
|
||||
return {"Severely polluted"};
|
||||
}
|
||||
else if (int(id(iaq).state) <= 500) {
|
||||
return {"Extremely polluted"};
|
||||
}
|
||||
else {
|
||||
return {"unknown"};
|
||||
}
|
||||
|
||||
- platform: bme68x_bsec2
|
||||
iaq_accuracy:
|
||||
# IAQ accuracy as a text value of Stabilizing, Uncertain, Calibrating, Calibrated
|
||||
name: "AQI Accuracy"
|
||||
web_server:
|
||||
sorting_weight: 61
|
||||
sorting_group_id: sorting_group_quality_settings
|
||||
@@ -1,3 +1,5 @@
|
||||
platform: restart
|
||||
name: "Restart"
|
||||
disabled_by_default: false
|
||||
button:
|
||||
- platform: restart
|
||||
name: "Restart"
|
||||
id: local_restart_button
|
||||
disabled_by_default: false
|
||||
@@ -23,14 +23,8 @@ ota:
|
||||
- platform: esphome
|
||||
password: !secret ota-password
|
||||
|
||||
binary_sensor:
|
||||
- <<: !include binary_sensor/status_sensor.config.yaml
|
||||
|
||||
button:
|
||||
- <<: !include button/restart_button.config.yaml
|
||||
|
||||
sensor:
|
||||
- <<: !include sensor/uptime_sensor.config.yaml
|
||||
|
||||
text_sensor:
|
||||
- <<: !include text_sensor/version_sensor.config.yaml
|
||||
packages:
|
||||
binary_sensor: !include binary_sensor/status_sensor.config.yaml
|
||||
button: !include button/restart_button.config.yaml
|
||||
sensor: !include sensor/uptime_sensor.config.yaml
|
||||
text_sensor: !include text_sensor/version_sensor.config.yaml
|
||||
|
||||
@@ -16,11 +16,10 @@ ethernet:
|
||||
|
||||
use_address: ${devicename}.local
|
||||
|
||||
manual_ip:
|
||||
static_ip: ${static_ip}
|
||||
gateway: !secret iot_default_gateway
|
||||
subnet: !secret iot_subnet_mask
|
||||
dns1: !secret iot_default_dns1
|
||||
# manual_ip:
|
||||
# static_ip: ${static_ip}
|
||||
# gateway: !secret iot_default_gateway
|
||||
# subnet: !secret iot_subnet_mask
|
||||
# dns1: !secret iot_default_dns1
|
||||
|
||||
text_sensor:
|
||||
- <<: !include text_sensor/ethernet_info.config.yaml
|
||||
text_sensor: !include text_sensor/ethernet_info.config.yaml
|
||||
@@ -0,0 +1,8 @@
|
||||
esp32:
|
||||
board: esp32-evb
|
||||
framework:
|
||||
#type: arduino
|
||||
type: ${framework}
|
||||
|
||||
packages:
|
||||
network: !include ../common/wifi.yaml
|
||||
@@ -1,3 +1,16 @@
|
||||
platform: wifi_signal
|
||||
name: RSSI
|
||||
update_interval: 60s
|
||||
# Example configuration entry with 2 sensors and filter
|
||||
sensor:
|
||||
- platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
|
||||
name: "RSSI"
|
||||
id: local_wifi_signal_db
|
||||
update_interval: 60s
|
||||
entity_category: "diagnostic"
|
||||
|
||||
- platform: copy # Reports the WiFi signal strength in %
|
||||
source_id: local_wifi_signal_db
|
||||
name: "WiFi Signal Strength"
|
||||
filters:
|
||||
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
|
||||
unit_of_measurement: "%"
|
||||
entity_category: "diagnostic"
|
||||
device_class: ""
|
||||
@@ -1,4 +1,6 @@
|
||||
platform: uptime
|
||||
name: Uptime
|
||||
disabled_by_default: true
|
||||
icon: mdi:timer-check
|
||||
sensor:
|
||||
- platform: uptime
|
||||
name: Uptime
|
||||
id: local_uptime_sensor
|
||||
disabled_by_default: true
|
||||
icon: mdi:timer-check
|
||||
@@ -1,10 +1,10 @@
|
||||
# Text sensors with general information.
|
||||
platform: ethernet_info
|
||||
ip_address:
|
||||
name: "IP Address"
|
||||
icon: mdi:ip
|
||||
disabled_by_default: true
|
||||
mac_address:
|
||||
name: MAC Address
|
||||
icon: mdi:network
|
||||
disabled_by_default: true
|
||||
text_sensor:
|
||||
- platform: ethernet_info
|
||||
ip_address:
|
||||
name: "IP Address"
|
||||
icon: mdi:ip
|
||||
disabled_by_default: true
|
||||
mac_address:
|
||||
name: MAC Address
|
||||
icon: mdi:network
|
||||
disabled_by_default: true
|
||||
@@ -1,5 +1,5 @@
|
||||
# Text sensors with general information.
|
||||
platform: ethernet_info
|
||||
ip_address:
|
||||
name: "IP Address"
|
||||
disabled_by_default: true
|
||||
text_sensor:
|
||||
- platform: ethernet_info
|
||||
ip_address:
|
||||
name: "IP Address"
|
||||
disabled_by_default: true
|
||||
@@ -1,4 +1,5 @@
|
||||
platform: ethernet_info
|
||||
mac_address:
|
||||
name: MAC Address
|
||||
disabled_by_default: true
|
||||
text_sensor:
|
||||
- platform: ethernet_info
|
||||
mac_address:
|
||||
name: MAC Address
|
||||
disabled_by_default: true
|
||||
@@ -1,6 +1,6 @@
|
||||
platform: version
|
||||
name: ESPHome Version
|
||||
# id: ${entity_name}_version
|
||||
hide_timestamp: true
|
||||
disabled_by_default: true
|
||||
icon: mdi:chip
|
||||
text_sensor:
|
||||
- platform: version
|
||||
name: ESPHome Version
|
||||
hide_timestamp: true
|
||||
disabled_by_default: true
|
||||
icon: mdi:chip
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
# Text sensors with general information.
|
||||
platform: wifi_info
|
||||
ip_address:
|
||||
name: IP
|
||||
icon: mdi:ip
|
||||
update_interval: 60s
|
||||
disabled_by_default: true
|
||||
ssid:
|
||||
name: SSID
|
||||
icon: mdi:lan
|
||||
update_interval: 60s
|
||||
disabled_by_default: true
|
||||
bssid:
|
||||
name: BSSID
|
||||
disabled_by_default: true
|
||||
update_interval: 60s
|
||||
icon: mdi:router-network
|
||||
mac_address:
|
||||
name: Wifi MAC Address
|
||||
disabled_by_default: true
|
||||
icon: mdi:wifi-cog
|
||||
text_sensor:
|
||||
- platform: wifi_info
|
||||
ip_address:
|
||||
name: IP
|
||||
icon: mdi:ip
|
||||
update_interval: 60s
|
||||
disabled_by_default: true
|
||||
ssid:
|
||||
name: SSID
|
||||
icon: mdi:lan
|
||||
update_interval: 60s
|
||||
disabled_by_default: true
|
||||
bssid:
|
||||
name: BSSID
|
||||
disabled_by_default: true
|
||||
update_interval: 60s
|
||||
icon: mdi:router-network
|
||||
mac_address:
|
||||
name: Wifi MAC Address
|
||||
disabled_by_default: true
|
||||
icon: mdi:wifi-cog
|
||||
|
||||
@@ -38,6 +38,4 @@ ethernet:
|
||||
|
||||
packages:
|
||||
ble_proxy: !include ../common/ble_proxy.yaml
|
||||
|
||||
text_sensor:
|
||||
- <<: !include text_sensor/ethernet_info.config.yaml
|
||||
text_sensor: !include text_sensor/ethernet_info.config.yaml
|
||||
@@ -0,0 +1,50 @@
|
||||
esphome:
|
||||
name: ${devicename}
|
||||
platformio_options:
|
||||
board_build.arduino.memory_type: qio_opi
|
||||
board_build.flash_mode: dio
|
||||
upload_speed: 921600
|
||||
monitor_speed: 115200
|
||||
|
||||
esp32:
|
||||
board: ${board}
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: ${framework}
|
||||
sdkconfig_options:
|
||||
CONFIG_ESP32_S3_BOX_BOARD: "y"
|
||||
|
||||
psram:
|
||||
mode: octal
|
||||
speed: 80MHz
|
||||
|
||||
packages:
|
||||
network: !include ../common/wifi.yaml
|
||||
|
||||
# captive_portal:
|
||||
|
||||
# wifi:
|
||||
# # Enable fast connect
|
||||
# fast_connect: true
|
||||
# min_auth_mode: WPA2
|
||||
# use_address: ${devicename}.local
|
||||
|
||||
# networks:
|
||||
# - ssid: !secret wifi_ssid
|
||||
# password: !secret wifi_password
|
||||
# hidden: true
|
||||
|
||||
# manual_ip:
|
||||
# static_ip: ${static_ip}
|
||||
# gateway: !secret iot_default_gateway
|
||||
# subnet: !secret iot_subnet_mask
|
||||
# dns1: !secret iot_default_dns1
|
||||
|
||||
# # Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
# ap:
|
||||
# ssid: "${friendly_name}"
|
||||
# password: !secret fallback_ap_password
|
||||
|
||||
# packages:
|
||||
# sensor: !include sensor/rssi_sensor.config.yaml
|
||||
# text_sensor: !include text_sensor/wifi_sensor.config.yaml
|
||||
@@ -23,8 +23,6 @@ wifi:
|
||||
ssid: "${friendly_name}"
|
||||
password: !secret fallback_ap_password
|
||||
|
||||
sensor:
|
||||
- <<: !include sensor/rssi_sensor.config.yaml
|
||||
|
||||
text_sensor:
|
||||
- <<: !include text_sensor/wifi_sensor.config.yaml
|
||||
packages:
|
||||
sensor: !include sensor/rssi_sensor.config.yaml
|
||||
text_sensor: !include text_sensor/wifi_sensor.config.yaml
|
||||
@@ -17,8 +17,6 @@ wifi:
|
||||
ssid: "${friendly_name}"
|
||||
password: !secret fallback_ap_password
|
||||
|
||||
sensor:
|
||||
- <<: !include sensor/rssi_sensor.config.yaml
|
||||
sensor: !include sensor/rssi_sensor.config.yaml
|
||||
|
||||
text_sensor:
|
||||
- <<: !include text_sensor/wifi_sensor.config.yaml
|
||||
text_sensor: !include text_sensor/wifi_sensor.config.yaml
|
||||
@@ -0,0 +1,138 @@
|
||||
substitutions:
|
||||
devicename: garage-cleversensor
|
||||
entity_name: garage_cleversensor
|
||||
friendly_name: Garage CleverSensor
|
||||
comment: Clever MultiSensor
|
||||
board: olimex_evb
|
||||
#framework: arduino
|
||||
framework: esp-idf
|
||||
network: wifi
|
||||
static_ip: !secret garage-cleversensor-ip
|
||||
i2c_id: bus_a
|
||||
|
||||
# For the ultrasonic sensors
|
||||
trigger1: 16
|
||||
echo1: 17
|
||||
trigger2: 19
|
||||
echo2: 20
|
||||
|
||||
# For the reed switches
|
||||
garage: 4
|
||||
outer: 5
|
||||
inner: 3
|
||||
|
||||
sda: 21
|
||||
scl: 22
|
||||
|
||||
# Infrared Sensor
|
||||
ir_tx: 12
|
||||
ir_rx: 39
|
||||
|
||||
# I2C Pins
|
||||
i2c_sda: 13
|
||||
i2c_scl: 16
|
||||
|
||||
# For the ethernet adapter
|
||||
ethernet_mdc_pin: 23
|
||||
ethernet_mdio_pin: 18
|
||||
ethernet_clk_pin: 0
|
||||
|
||||
# For the relays
|
||||
relay1: 32 # Garage
|
||||
relay2: 33
|
||||
|
||||
# Built-in button
|
||||
button1: 34
|
||||
|
||||
esphome:
|
||||
name: ${devicename}
|
||||
friendly_name: ${friendly_name}
|
||||
name_add_mac_suffix: false
|
||||
|
||||
packages:
|
||||
board: !include common/olimex_evb_wifi.yaml
|
||||
device_base: !include common/device_base.yaml
|
||||
web_server: !include common/web_server.yaml
|
||||
bme680: !include common/bme68x_bsec2_i2c.yaml
|
||||
|
||||
# remote_receiver:
|
||||
# pin: ${ir_rx}
|
||||
# dump: all
|
||||
|
||||
# remote_transmitter:
|
||||
# pin: ${ir_tx}
|
||||
# carrier_duty_percent: 50%
|
||||
|
||||
i2c:
|
||||
- id: ${i2c_id}
|
||||
sda: ${sda}
|
||||
scl: ${scl}
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: ${relay1}
|
||||
name: "Relay1"
|
||||
|
||||
- platform: gpio
|
||||
pin: ${relay2}
|
||||
name: "Relay2"
|
||||
|
||||
sensor:
|
||||
- platform: ultrasonic
|
||||
name: Car Sensor East Side
|
||||
trigger_pin: ${trigger1}
|
||||
echo_pin: ${echo1}
|
||||
id: ultrasonic1
|
||||
timeout: 4.0m
|
||||
update_interval: 0.5s
|
||||
filters:
|
||||
- or:
|
||||
- throttle_average: 30s
|
||||
- delta: 0.5
|
||||
- sliding_window_moving_average:
|
||||
window_size: 5
|
||||
send_every: 5
|
||||
- delta: 0.0254
|
||||
|
||||
- platform: ultrasonic
|
||||
name: Car Sensor West Side
|
||||
trigger_pin: ${trigger2}
|
||||
echo_pin: ${echo2}
|
||||
id: ultrasonic2
|
||||
timeout: 4.0m
|
||||
update_interval: 0.5s
|
||||
filters:
|
||||
- or:
|
||||
- throttle_average: 30s
|
||||
- delta: 0.5
|
||||
- sliding_window_moving_average:
|
||||
window_size: 5
|
||||
send_every: 5
|
||||
- delta: 0.0254
|
||||
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "ESP32-EVB button"
|
||||
pin: ${button1}
|
||||
|
||||
- platform: gpio
|
||||
name: "Garage Door"
|
||||
device_class: door
|
||||
pin:
|
||||
number: ${garage}
|
||||
mode: INPUT_PULLUP
|
||||
|
||||
- platform: gpio
|
||||
name: "Outer Door"
|
||||
device_class: door
|
||||
pin:
|
||||
number: ${outer}
|
||||
mode: INPUT_PULLUP
|
||||
|
||||
- platform: gpio
|
||||
name: "Inner Door"
|
||||
device_class: door
|
||||
pin:
|
||||
number: ${inner}
|
||||
mode: INPUT_PULLUP
|
||||
@@ -1,16 +1,17 @@
|
||||
substitutions:
|
||||
name: home-assistant-voice-097b44
|
||||
devicename: home-assistant-voice-097b44
|
||||
friendly_name: Home Assistant Voice 097b44
|
||||
comment: Clever Voice
|
||||
static_ip: !secret clints-home-assistant-voice
|
||||
packages:
|
||||
base: !include common/device_base.yaml
|
||||
network: !include common/wifi.yaml
|
||||
Nabu Casa.Home Assistant Voice PE: github://esphome/home-assistant-voice-pe/home-assistant-voice.yaml
|
||||
esphome:
|
||||
name: ${name}
|
||||
name_add_mac_suffix: false
|
||||
friendly_name: ${friendly_name}
|
||||
api:
|
||||
encryption:
|
||||
key: !secret api-encryption-key
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
button:
|
||||
- id: !remove local_restart_button
|
||||
@@ -12,6 +12,7 @@ packages:
|
||||
network: !include common/wifi.yaml
|
||||
device_base: !include common/device_base.yaml
|
||||
bme680: !include common/bme680.yaml
|
||||
too_humid: !include common/binary_sensor/too_humid.yaml
|
||||
|
||||
esphome:
|
||||
name: ${devicename}
|
||||
|
||||
@@ -49,17 +49,19 @@ cards:
|
||||
show_entity_picture: true
|
||||
vertical: true
|
||||
- type: tile
|
||||
entity: sensor.tumble_dryer
|
||||
entity: input_select.dishwasher_fun_status
|
||||
name: Dishwasher
|
||||
icon_tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/tumble-dryer
|
||||
navigation_path: /phone-yaml/dishwasher
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/tumble-dryer
|
||||
navigation_path: /phone-yaml/dishwasher
|
||||
show_entity_picture: true
|
||||
vertical: true
|
||||
- type: tile
|
||||
entity: sensor.washing_machine
|
||||
entity: input_select.washing_machine_fun_status
|
||||
name: Washing Machine
|
||||
icon_tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/washing-machine
|
||||
@@ -68,6 +70,17 @@ cards:
|
||||
navigation_path: /phone-yaml/washing-machine
|
||||
show_entity_picture: true
|
||||
vertical: true
|
||||
- type: tile
|
||||
entity: input_select.dryer_fun_status
|
||||
name: Dryer
|
||||
icon_tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/tumble-dryer
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/tumble-dryer
|
||||
show_entity_picture: true
|
||||
vertical: true
|
||||
- type: glance
|
||||
entities:
|
||||
- entity: input_boolean.empty_dishwasher
|
||||
|
||||
@@ -49,17 +49,19 @@ cards:
|
||||
show_entity_picture: true
|
||||
vertical: true
|
||||
- type: tile
|
||||
entity: sensor.tumble_dryer
|
||||
entity: input_select.dishwasher_fun_status
|
||||
name: Dishwasher
|
||||
icon_tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/tumble-dryer
|
||||
navigation_path: /phone-yaml/dishwasher
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/tumble-dryer
|
||||
navigation_path: /phone-yaml/dishwasher
|
||||
show_entity_picture: true
|
||||
vertical: true
|
||||
- type: tile
|
||||
entity: sensor.washing_machine
|
||||
entity: input_select.washing_machine_fun_status
|
||||
name: Washing Machine
|
||||
icon_tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/washing-machine
|
||||
@@ -68,6 +70,17 @@ cards:
|
||||
navigation_path: /phone-yaml/washing-machine
|
||||
show_entity_picture: true
|
||||
vertical: true
|
||||
- type: tile
|
||||
entity: input_select.dryer_fun_status
|
||||
name: Dryer
|
||||
icon_tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/tumble-dryer
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/tumble-dryer
|
||||
show_entity_picture: true
|
||||
vertical: true
|
||||
- type: glance
|
||||
entities:
|
||||
- entity: input_boolean.fold_clothes
|
||||
|
||||
@@ -50,17 +50,19 @@ cards:
|
||||
show_entity_picture: true
|
||||
vertical: true
|
||||
- type: tile
|
||||
entity: sensor.tumble_dryer
|
||||
entity: input_select.dishwasher_fun_status
|
||||
name: Dishwasher
|
||||
icon_tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/tumble-dryer
|
||||
navigation_path: /phone-yaml/dishwasher
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/tumble-dryer
|
||||
navigation_path: /phone-yaml/dishwasher
|
||||
show_entity_picture: true
|
||||
vertical: true
|
||||
- type: tile
|
||||
entity: sensor.washing_machine
|
||||
entity: input_select.washing_machine_fun_status
|
||||
name: Washing Machine
|
||||
icon_tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/washing-machine
|
||||
@@ -69,6 +71,17 @@ cards:
|
||||
navigation_path: /phone-yaml/washing-machine
|
||||
show_entity_picture: true
|
||||
vertical: true
|
||||
- type: tile
|
||||
entity: input_select.dryer_fun_status
|
||||
name: Dryer
|
||||
icon_tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/tumble-dryer
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: /phone-yaml/tumble-dryer
|
||||
show_entity_picture: true
|
||||
vertical: true
|
||||
- type: glance
|
||||
entities:
|
||||
- entity: input_boolean.swap_laundry
|
||||
|
||||
@@ -120,8 +120,8 @@ sections:
|
||||
action: more-info
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.thermal_comfort_summer_scharlau_perception
|
||||
primary: Summer Scharlau
|
||||
secondary: >
|
||||
secondary: Summer Scharlau
|
||||
primary: >
|
||||
{% if
|
||||
is_state('sensor.thermal_comfort_summer_scharlau_perception','comfortable')
|
||||
%} Comfy {% elif
|
||||
@@ -132,7 +132,7 @@ sections:
|
||||
is_state('sensor.thermal_comfort_summer_scharlau_perception','highly_uncomfortable')
|
||||
%} Highly Uncomfortable {% elif
|
||||
is_state('sensor.thermal_comfort_summer_scharlau_perception','outside_calculable_range')
|
||||
%} Outside Calculable Range {% endif %}
|
||||
%} N/A {% endif %}
|
||||
icon: >
|
||||
{% if
|
||||
is_state('sensor.thermal_comfort_summer_scharlau_perception','comfortable')
|
||||
@@ -156,7 +156,7 @@ sections:
|
||||
is_state('sensor.thermal_comfort_summer_scharlau_perception','highly_uncomfortable')
|
||||
%} red {% elif
|
||||
is_state('sensor.thermal_comfort_summer_scharlau_perception','outside_calculable_range')
|
||||
%} gray {% endif %}
|
||||
%} disabled {% endif %}
|
||||
tap_action:
|
||||
action: more-info
|
||||
- type: custom:mushroom-template-card
|
||||
@@ -189,7 +189,7 @@ sections:
|
||||
is_state('sensor.thermal_comfort_dew_point_perception','severely_high')
|
||||
%} Miserable
|
||||
|
||||
{% else %} Unknown {% endif %}
|
||||
{% else %} N/A {% endif %}
|
||||
secondary: |
|
||||
Dew Point Perception
|
||||
icon: tc:dew-point
|
||||
@@ -251,7 +251,7 @@ sections:
|
||||
is_state('sensor.thermal_comfort_humidex_perception','heat_stroke') %}
|
||||
Hazardous
|
||||
|
||||
{% else %} disabled {% endif %}
|
||||
{% else %} N/A {% endif %}
|
||||
secondary: |
|
||||
Humidex
|
||||
icon: tc:thermal-perception
|
||||
@@ -285,8 +285,8 @@ sections:
|
||||
action: more-info
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.thermal_comfort_relative_strain_perception
|
||||
primary: Relative Strain
|
||||
secondary: >
|
||||
secondary: Relative Strain
|
||||
primary: >
|
||||
{% if
|
||||
is_state('sensor.thermal_comfort_relative_strain_perception','comfortable')
|
||||
%} Comfy {% elif
|
||||
@@ -297,7 +297,8 @@ sections:
|
||||
is_state('sensor.thermal_comfort_relative_strain_perception','significant_discomfort')
|
||||
%} Significant Discomfort {% elif
|
||||
is_state('sensor.thermal_comfort_relative_strain_perception','extreme_discomfort')
|
||||
%} Extreme Discomfort {% endif %}
|
||||
%} Extreme Discomfort {% else
|
||||
%} N/A {% endif %}
|
||||
icon: tc:dew-point-alternative
|
||||
icon_color: >
|
||||
{% if
|
||||
@@ -310,13 +311,14 @@ sections:
|
||||
is_state('sensor.thermal_comfort_relative_strain_perception','significant_discomfort')
|
||||
%} red {% elif
|
||||
is_state('sensor.thermal_comfort_relative_strain_perception','extreme_discomfort')
|
||||
%} red {% endif %}
|
||||
%} red {% else
|
||||
%} disabled {% endif %}
|
||||
tap_action:
|
||||
action: more-info
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.thermal_comfort_thoms_discomfort_perception
|
||||
primary: Thoms
|
||||
secondary: >
|
||||
secondary: Thoms
|
||||
primary: >
|
||||
{% if
|
||||
is_state('sensor.thermal_comfort_thoms_discomfort_perception','no_discomfort')
|
||||
%} No discomfort {% elif
|
||||
@@ -329,7 +331,8 @@ sections:
|
||||
is_state('sensor.thermal_comfort_thoms_discomfort_perception','everyone')
|
||||
%} Everyone {% elif
|
||||
is_state('sensor.thermal_comfort_thoms_discomfort_perception','dangerous')
|
||||
%} Dangerous {% endif %}
|
||||
%} Dangerous {% else
|
||||
%} N/A {% endif %}
|
||||
icon: tc:heat-index
|
||||
icon_color: >
|
||||
{% if
|
||||
@@ -344,13 +347,14 @@ sections:
|
||||
is_state('sensor.thermal_comfort_thoms_discomfort_perception','everyone')
|
||||
%} red {% elif
|
||||
is_state('sensor.thermal_comfort_thoms_discomfort_perception','dangerous')
|
||||
%} red {% endif %}
|
||||
%} red {% else
|
||||
%} disabled {% endif %}
|
||||
tap_action:
|
||||
action: more-info
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.thermal_comfort_winter_scharlau_perception
|
||||
primary: Winter Scharlau
|
||||
secondary: >
|
||||
secondary: Winter Scharlau
|
||||
primary: >
|
||||
{% if
|
||||
is_state('sensor.thermal_comfort_winter_scharlau_perception','comfortable')
|
||||
%} Comfy {% elif
|
||||
@@ -361,7 +365,7 @@ sections:
|
||||
is_state('sensor.thermal_comfort_winter_scharlau_perception','highly_uncomfortable')
|
||||
%} Highly Uncomfortable {% elif
|
||||
is_state('sensor.thermal_comfort_winter_scharlau_perception','outside_calculable_range')
|
||||
%} Outside Calculable Range {% endif %}
|
||||
%} N/A {% endif %}
|
||||
icon: >
|
||||
{% if
|
||||
is_state('sensor.thermal_comfort_winter_scharlau_perception','comfortable')
|
||||
@@ -385,7 +389,8 @@ sections:
|
||||
is_state('sensor.thermal_comfort_winter_scharlau_perception','highly_uncomfortable')
|
||||
%} red {% elif
|
||||
is_state('sensor.thermal_comfort_winter_scharlau_perception','outside_calculable_range')
|
||||
%} gray {% endif %}
|
||||
%} gray {% else
|
||||
%} disabled {% endif %}
|
||||
tap_action:
|
||||
action: more-info
|
||||
- type: custom:mushroom-entity-card
|
||||
|
||||
@@ -352,8 +352,8 @@ cards:
|
||||
hold_action:
|
||||
action: toggle
|
||||
secondary: |-
|
||||
{{states('sensor.bathroom_multisensor_air_temperature')}}°F
|
||||
{{states('sensor.bathroom_multisensor_relative_humidity')}}%
|
||||
{{states('sensor.bathroom_multisensor_air_temperature') | round(2) }}°F
|
||||
{{states('sensor.bathroom_multisensor_relative_humidity') | round(2) }}%
|
||||
icon_color: "{{iif(is_state('light.master_bathroom_hue','on'),'yellow')}}"
|
||||
multiline_secondary: true
|
||||
layout: vertical
|
||||
@@ -367,8 +367,8 @@ cards:
|
||||
hold_action:
|
||||
action: toggle
|
||||
secondary: |-
|
||||
{{states('sensor.utility_room_thermostat_temperature')}}°F
|
||||
{{states('sensor.utility_room_thermostat_humidity')}}%
|
||||
{{states('sensor.utility_room_multisensor_air_temperature') | round(2) }}°F
|
||||
{{states('sensor.utility_room_multisensor_relative_humidity') | round(2) }}%
|
||||
icon_color: "{{iif(is_state('light.utility_room_vanity','on'),'yellow')}}"
|
||||
multiline_secondary: true
|
||||
layout: vertical
|
||||
|
||||
@@ -28,14 +28,14 @@ cards:
|
||||
- hours_to_show: 24
|
||||
graph: line
|
||||
type: sensor
|
||||
entity: sensor.bathroom_multisensor_air_temperature
|
||||
entity: sensor.master_bathroom_thermostat_temperature
|
||||
detail: 1
|
||||
name: Thermostat
|
||||
- hours_to_show: 24
|
||||
graph: line
|
||||
type: sensor
|
||||
detail: 1
|
||||
entity: sensor.bathroom_multisensor_relative_humidity
|
||||
entity: sensor.master_bathroom_thermostat_humidity
|
||||
name: Thermostat
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
@@ -47,8 +47,8 @@ cards:
|
||||
name: Simmer
|
||||
- type: history-graph
|
||||
entities:
|
||||
- entity: binary_sensor.master_bathroom_hygrostat
|
||||
name: Hygrostat
|
||||
- entity: binary_sensor.bathroom_multisensor_too_humid
|
||||
name: Too Humid
|
||||
hours_to_show: 24
|
||||
- type: vertical-stack
|
||||
cards:
|
||||
|
||||
@@ -47,8 +47,8 @@ cards:
|
||||
name: Simmer
|
||||
- type: history-graph
|
||||
entities:
|
||||
- entity: binary_sensor.utility_room_hygrostat
|
||||
name: Hygrostat
|
||||
- entity: binary_sensor.utility_room_multisensor_too_humid
|
||||
name: Too Humid
|
||||
hours_to_show: 24
|
||||
- type: vertical-stack
|
||||
cards:
|
||||
|
||||
@@ -60,4 +60,7 @@
|
||||
- url: /hacsfiles/advanced-camera-card/advanced-camera-card.js
|
||||
type: module
|
||||
|
||||
- url: /hacsfiles/device-card/device-card.js
|
||||
type: module
|
||||
|
||||
- url: /local
|
||||
@@ -364,7 +364,7 @@ cards:
|
||||
- sensor.master_bedroom_multisensor_air_temperature
|
||||
- sensor.thermostat_temperature
|
||||
- sensor.utility_room_thermostat_temperature
|
||||
- sensor.bathroom_multisensor_relative_humidity
|
||||
- sensor.bathroom_multisensor_air_temperature
|
||||
- sensor.downstairs_temperature
|
||||
- sensor.computer_area_multisensor_air_temperature
|
||||
- sensor.mancave_thermostat_temperature
|
||||
|
||||
@@ -44,9 +44,9 @@ cards:
|
||||
title: Upstairs Humidity
|
||||
type: history-graph
|
||||
- entities:
|
||||
- entity: sensor.bathroom_multisensor_relative_humidity
|
||||
- entity: sensor.bathroom_multisensor_air_temperature
|
||||
name: Master Bathroom
|
||||
- entity: sensor.utility_room_thermostat_temperature
|
||||
- entity: sensor.utility_room_multisensor_air_temperature
|
||||
name: Utility Room
|
||||
hours_to_show: 12
|
||||
refresh_interval: 60
|
||||
@@ -87,7 +87,7 @@ cards:
|
||||
- entities:
|
||||
- entity: sensor.bathroom_multisensor_relative_humidity
|
||||
name: Master Bathroom
|
||||
- entity: sensor.utility_room_thermostat_humidity
|
||||
- entity: sensor.utility_room_multisensor_relative_humidity
|
||||
name: Utility Room
|
||||
hours_to_show: 12
|
||||
refresh_interval: 60
|
||||
|
||||
@@ -13,39 +13,19 @@ sequence:
|
||||
|
||||
- action: media_player.volume_set
|
||||
target:
|
||||
entity_id: media_player.ma_home_assistant_voice_097b44_media_player
|
||||
# entity_id: media_player.ma_home_assistant_voice_097b44_media_player
|
||||
entity_id: media_player.ma_master_bedroom_clock
|
||||
data:
|
||||
volume_level: "{{iif(volume>1,1,volume)}}"
|
||||
|
||||
# - action: media_player.play_media
|
||||
# data:
|
||||
# media_content_id: media-source://media_source/alarms/Alarm_Clock.mp3
|
||||
# media_content_type: music
|
||||
# target:
|
||||
# entity_id: media_player.ma_home_assistant_voice_097b44_media_player
|
||||
|
||||
# - delay:
|
||||
# hours: 0
|
||||
# minutes: 0
|
||||
# seconds: 12
|
||||
# milliseconds: 0
|
||||
|
||||
- action: tts.speak
|
||||
target:
|
||||
entity_id: tts.google_translate_en_com
|
||||
data:
|
||||
media_player_entity_id: media_player.ma_home_assistant_voice_097b44_media_player
|
||||
message: "Pick up the kids at 7 for Donuts with Dads! Its {{ now().strftime('%-I:%M %p') }} so you need to get out of bed and get ready for work and get the kids ready for school"
|
||||
|
||||
# - action: tts.speak
|
||||
# target:
|
||||
# entity_id: tts.google_ai_tts
|
||||
# data:
|
||||
# cache: false
|
||||
# message: "Wake the user in a flirtacious and seductive voice: {{ response.text }}"
|
||||
# media_player_entity_id: media_player.great_room
|
||||
# options:
|
||||
# voice: Callirrhoe
|
||||
# media_player_entity_id: media_player.ma_home_assistant_voice_097b44_media_player
|
||||
media_player_entity_id: media_player.ma_master_bedroom_clock
|
||||
#message: "Pick up the kids at 7 for Donuts with Dads! Its {{ now().strftime('%-I:%M %p') }} so you need to get out of bed and get ready for work and get the kids ready for school"
|
||||
message: "You have {{ states('todo.local_to_do') }} items on your daily task list: {{ local_todo['todo.local_to_do']['items'] | map(attribute='summary') | list | join(', ') }}"
|
||||
|
||||
- delay:
|
||||
hours: 0
|
||||
|
||||
Reference in New Issue
Block a user