template: - binary_sensor: - name: Emma Aircon - Compressor unique_id: 21bcbb62-823c-43ff-8c2c-26e940324ee6 state: "{{ states('sensor.emma_air_conditioner_power') | int > 150 }}" availability: "{{ states('fan.emma_air_conditioner') not in ['unknown','unavailable'] }}" device_class: running - name: Emma Aircon - Fan unique_id: 9e3054cf-8f7e-4fef-9da4-5b2f2bc99c9d state: "{{ states('sensor.emma_air_conditioner_power') | int > 20 }}" availability: "{{ states('fan.emma_air_conditioner') not in ['unknown','unavailable'] }}" device_class: running - name: Master Bedroom Aircon - Compressor unique_id: 87051957-1dbc-4d65-b138-e8469728f58f state: "{{ states('sensor.master_bedroom_aircon_power') | int > 150 }}" availability: "{{ states('climate.master_bedroom_aircon') not in ['unknown','unavailable'] }}" device_class: running - name: Master Bedroom Aircon - Fan unique_id: ae893dd6-129c-4886-a966-a89b958d9f08 state: "{{ states('sensor.master_bedroom_aircon_power') | int > 20 }}" availability: "{{ states('climate.master_bedroom_aircon') not in ['unknown','unavailable'] }}" device_class: running - name: Kallen Fan - Separate Schedule unique_id: 3f243861-6a1f-412f-b9e3-933b54793b08 state: "{{ states('input_datetime.kallen_fan') != states('input_datetime.kallen_bedtime') }}" - name: Living Room Front Hot unique_id: 8fd9db5e-7883-42f3-8918-e78d52c680c6 state: "{{ states('sensor.living_room_front_temperature') | float >= 80 }}" device_class: heat - name: Living Room Front Cold unique_id: 48494ec8-a63f-4244-b619-ff78c44f28e8 state: "{{ states('sensor.living_room_front_temperature') | float <= 60 }}" device_class: cold - name: Downstairs Bathroom Hot unique_id: b68adefa-e30e-4454-be21-2743af0f1674 state: "{{ states('sensor.downstairs_bathroom_temperature') | float >= 80 }}" device_class: heat - name: Downstairs Bathroom Cold unique_id: c477a45e-f11c-4af5-87aa-90f006b74ac5 state: "{{ states('sensor.downstairs_bathroom_temperature') | float <= 55 }}" device_class: cold - name: Stairwell Bottom Hot unique_id: ebd09e52-c31e-442e-8767-a8083b99c66c state: "{{ states('sensor.stairwell_bottom_temperature') | float >= 80 }}" device_class: heat - name: Stairwell Bottom Cold unique_id: 3f8b5340-0fb4-489f-8df7-c2843316009f state: "{{ states('sensor.stairwell_bottom_temperature') | float <= 60 }}" device_class: cold - name: Upstairs Bathroom Hot unique_id: 86394cea-9499-4595-85d1-2a026e8e2b27 state: "{{ states('sensor.upstairs_bathroom_temperature') | float >= 80 }}" device_class: heat - name: Upstairs Bathroom Cold unique_id: 5d720614-90f0-4e69-8086-8bc0f47a78eb state: "{{ states('sensor.upstairs_bathroom_temperature') | float <= 60 }}" device_class: cold - name: Emma Bedroom Hot unique_id: b453e23a-f3c9-4fab-bf82-d08af05e8a94 state: "{{ states('sensor.emma_bedroom_temperature') | float >= 75 }}" device_class: heat - name: Emma Bedroom Cold unique_id: 41174b21-a46f-4deb-8dbc-61a356b33db1 state: "{{ states('sensor.emma_bedroom_temperature') | float <= 60 }}" device_class: cold - name: Basement Studio Hot unique_id: 2c5626e9-9a3f-43b0-9595-3a15c9434b0f state: "{{ states('sensor.basement_studio_temperature') | float >= 80 }}" device_class: heat - name: Basement Studio Cold unique_id: 985f4f8c-2297-4d32-ace7-818534c5e4b5 state: "{{ states('sensor.basement_studio_temperature') | float <= 60 }}" device_class: cold - name: Living Room Back Hot unique_id: 9a2be430-9322-492b-a0c1-bb0f034979f5 state: "{{ states('sensor.living_room_back_temperature') | float >= 80 }}" device_class: heat - name: Living Room Back Cold unique_id: 524c2ad1-1f44-42c0-b06b-28a40d439832 state: "{{ states('sensor.living_room_back_temperature') | float <= 60 }}" device_class: cold - name: Mud Room Hot unique_id: 920fa45e-8c6e-4518-9aea-5141e15a4350 state: "{{ states('sensor.mud_room_temperature') | float >= 80 }}" device_class: heat - name: Mud Room Cold unique_id: 459998f5-7011-4e96-aa8a-076591a1b1ce state: "{{ states('sensor.mud_room_temperature') | float <= 60 }}" device_class: cold - name: Stairwell Top Hot unique_id: 22d325db-e213-4d7b-81a8-a7ba3798e751 state: "{{ states('sensor.stairwell_top_temperature') | float >= 80 }}" device_class: heat - name: Stairwell Top Cold unique_id: 925bf2d5-cfa6-4508-98c4-b7ad185ddbc1 state: "{{ states('sensor.stairwell_top_temperature') | float <= 60 }}" device_class: cold - name: Kallen Bedroom Hot unique_id: e47ba60f-e9b2-48d4-899b-f16fdb146e75 state: "{{ states('sensor.kallen_bedroom_temperature') | float >= 75 }}" device_class: heat - name: Kallen Bedroom Cold unique_id: 69115462-c159-4f5b-b047-ff8a2600fa7d state: "{{ states('sensor.kallen_bedroom_temperature') | float <= 60 }}" device_class: cold - name: Master Bedroom Hot unique_id: ca7c96e5-ea83-4698-a43c-16e09af6d6fd state: "{{ states('sensor.master_bedroom_temperature') | float >= 75 }}" device_class: heat - name: Master Bedroom Cold unique_id: 1577cb2c-234d-41c8-a12e-5111a77df958 state: "{{ states('sensor.master_bedroom_temperature') | float <= 60 }}" device_class: cold - sensor: - name: "Master Bedroom Target Temp" unique_id: 2ce31844-b115-42b8-8213-feccf24e236c state: "{{ state_attr('climate.master_bedroom_aircon','temperature') | float }}" availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}" - name: "Master Bedroom Eco Mode" unique_id: edf36e23-adcf-4506-80eb-a14f4ea2fce0 state: "{{ is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') }}" icon: >- {% if is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') %} mdi:home-lightning-bolt {% else %} mdi:home-lightning-bolt-outline {% endif %} availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}" - name: "Master Bedroom Aircon Fan Mode" unique_id: c0e4f9ba-0c6c-4673-9a75-13f253f2f2e8 state: "{{ state_attr('climate.master_bedroom_aircon','fan_mode') }}" icon: > {% if is_state_attr('climate.master_bedroom_aircon','fan_mode','Auto') %} mdi:fan-auto {% elif is_state_attr('climate.master_bedroom_aircon','fan_mode','Low') %} mdi:fan-speed-1 {% elif is_state_attr('climate.master_bedroom_aircon','fan_mode','Medium') %} mdi:fan-speed-2 {% elif is_state_attr('climate.master_bedroom_aircon','fan_mode','High') %} mdi:fan-speed-3 {% else %} mdi:fan-off {% endif %} availability: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}" - name: Living Room Average Temperature unique_id: c4a901a6-87e2-4257-b60b-2944be8fdf04 state: > {{ states.sensor | selectattr('attributes.device_class','eq','temperature') | selectattr('entity_id','in',label_entities('Indoor Temperature')) | selectattr('entity_id','in',area_entities('living_room')) | rejectattr('entity_id','in',integration_entities('template')) | rejectattr('entity_id','is_hidden_entity') | rejectattr('attributes.is_group','eq',true) | rejectattr('attributes.entity_id','defined') | rejectattr('state','in',['unavailable','unknown']) | map(attribute='state') | map('float',1) | average(0) | round(1) }} icon: mdi:thermometer device_class: temperature unit_of_measurement: °F state_class: measurement - name: Living Room Average Illuminance unique_id: 0b4d9f65-fee3-4f2d-aa8a-207bc9f9ca10 state: > {{ states.sensor | selectattr('attributes.device_class','eq','illuminance') | selectattr('entity_id','in',label_entities('Lux')) | selectattr('entity_id','in',area_entities('living_room')) | rejectattr('entity_id','in',integration_entities('template')) | rejectattr('entity_id','is_hidden_entity') | rejectattr('attributes.is_group','eq',true) | rejectattr('attributes.entity_id','defined') | rejectattr('state','in',['unavailable','unknown']) | map(attribute='state') | map('int') | average(0) | round(0) }} icon: mdi:brightness-5 device_class: illuminance unit_of_measurement: lx state_class: measurement input_boolean: master_bedroom_climate_protocol: name: Master Bedroom Climate Protocol icon: mdi:lightbulb-night kallen_bedtime_protocol: name: Kallen Bedtime Protocol icon: mdi:lightbulb-night # Turn on when master bedroom air conditioner is installed, turn off in winter when we take it out, for smarter automations master_bedroom_aircon_installed: name: Master Bedroom Aircon Installed icon: mdi:tools # Same thing, but for Emma's bedroom air conditioner emma_bedroom_aircon_installed: name: Emma Bedroom Aircon Installed icon: mdi:tools # Used internally for automations to know if cooling time has passed or not master_bedroom_cooling_on: name: Master Bedroom Cooling On icon: mdi:snowflake # Activated if the day will be excessively hot. For use with automations for daytime climate control. hot_day: name: Hot Day icon: mdi:heat-wave # Activated (manually) to immediately put all climate devices into their best cooling configurations meltdown_protocol: name: Meltdown Protocol icon: mdi:skull-crossbones # Activated if the day will be excessively cold. For use with automations for daytime climate control. cold_day: name: Cold Day icon: mdi:snowflake basement_studio_heat_allowed: name: Basement Studio Heat Allowed icon: mdi:heating-coil emma_bedroom_heater_installed: name: Emma Bedroom Heater Installed icon: mdi:heating-coil input_select: scheduled_climate_mode_master_bedroom_aircon: name: Scheduled Climate Mode - Master Bedroom Aircon options: - AC - Fan - N/A icon: mdi:home-thermometer scheduled_climate_mode_master_bedroom_fan: name: Scheduled Climate Mode - Master Bedroom Fan options: - Fan - N/A icon: mdi:home-thermometer scheduled_climate_mode_emma_bedroom: name: Scheduled Climate Mode - Emma Bedroom options: - AC - Heat - White Noise - N/A icon: mdi:home-thermometer scheduled_climate_mode_kallen_bedroom: name: Scheduled Climate Mode - Kallen Bedroom options: - Fan - White Noise - N/A icon: mdi:home-thermometer input_number: master_bedroom_daytime_temp: name: Master Bedroom Daytime Temp min: 65 max: 80 step: 1 unit_of_measurement: °F icon: mdi:thermometer master_bedroom_night_temp: name: Master Bedroom Night Temp min: 65 max: 80 step: 1 unit_of_measurement: °F icon: mdi:thermometer master_bedroom_bedtime_temp: name: Master Bedroom Bedtime Temp min: 65 max: 80 step: 1 unit_of_measurement: °F icon: mdi:thermometer master_bedroom_aircon_run_threshold: name: Master Bedroom Aircon Run Threshold min: 40 max: 80 step: 1 unit_of_measurement: °F icon: mdi:thermometer master_bedroom_aircon_mode_threshold: name: Master Bedroom Aircon Mode Threshold min: 40 max: 80 step: 1 unit_of_measurement: °F icon: mdi:thermometer master_bedroom_fan_threshold: name: Master Bedroom Fan Threshold min: 30 max: 70 step: 1 unit_of_measurement: °F icon: mdi:thermometer master_bedroom_auto_cooling_threshold: name: Master Bedroom Auto Cooling Threshold min: 70 max: 90 step: 1 unit_of_measurement: °F icon: mdi:thermometer emma_aircon_threshold: name: Emma Aircon Threshold min: 40 max: 80 step: 1 unit_of_measurement: °F icon: mdi:thermometer kallen_fan_threshold: name: Kallen Fan Threshold min: 40 max: 70 step: 1 unit_of_measurement: °F icon: mdi:thermometer hot_day_threshold: name: Hot Day Threshold min: 70 max: 100 step: 1 unit_of_measurement: °F icon: mdi:thermometer heat_index_threshold: name: Heat Index Threshold min: 70 max: 100 step: 1 unit_of_measurement: °F icon: mdi:thermometer cold_day_threshold: name: Cold Day Threshold min: 0 max: 40 step: 1 unit_of_measurement: °F icon: mdi:thermometer overnight_low_threshold: name: Overnight Low Threshold min: -20 max: 20 step: 1 unit_of_measurement: °F icon: mdi:thermometer wind_chill_threshold: name: Wind Chill Threshold min: 0 max: 40 step: 1 unit_of_measurement: °F icon: mdi:thermometer hot_overnight_threshold: name: Hot Overnight Threshold min: 40 max: 80 step: 1 unit_of_measurement: °F icon: mdi:thermometer extended_heat_threshold: name: Extended Heat Threshold min: 70 max: 100 step: 1 unit_of_measurement: °F icon: mdi:thermometer climate: - platform: generic_thermostat unique_id: c2979677-045e-4393-a1cb-e6618978394f name: Basement Studio Thermostat heater: switch.basement_studio_heater target_sensor: sensor.basement_studio_temperature min_temp: 50 max_temp: 80 target_temp: 62 ac_mode: false min_cycle_duration: minutes: 2 cold_tolerance: 1 hot_tolerance: 0 initial_hvac_mode: "off" precision: 1.0 - platform: generic_thermostat unique_id: 52cb7523-155a-4b26-808a-d6037b3ef7e4 name: Emma Bedroom Thermostat heater: switch.emma_bedroom_heater target_sensor: sensor.emma_bedroom_temperature min_temp: 50 max_temp: 80 target_temp: 62 ac_mode: false min_cycle_duration: minutes: 2 cold_tolerance: 1 hot_tolerance: 0 initial_hvac_mode: "off" precision: 1.0 intent_script: MasterBedroomModes: action: service: "button.press" data: entity_id: "{{ mode }}" speech: text: "Master bedroom set to {{ mode }}"