Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rodpayne committed Mar 16, 2023
2 parents f54a0ee + 86782e4 commit 3a0c26d
Show file tree
Hide file tree
Showing 4 changed files with 240 additions and 68 deletions.
117 changes: 56 additions & 61 deletions .homeassistant/packages/ecobee.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
automation:

#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - set Away mode when Current House Mode is set to Away or Vacation
#----------------------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - set Away mode when Current House Mode is set to Away or Vacation
#----------------------------------------------------------------------------------------------------------

- alias: Set Thermostat Away
id: 7e4eea5a-8f50-4317-a5ca-d0490ef07520
initial_state: 'on'
initial_state: "on"
trigger:
platform: state
entity_id: input_select.current_house_mode
Expand All @@ -24,28 +23,28 @@ automation:
Home
{% endif %}
#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - set Away mode when back door or front door was left open
#----------------------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - set Away mode when back door or front door was left open
#----------------------------------------------------------------------------------------------------------

- alias: Door Left Open
id: 6cdf795b-070d-4328-be6e-86489c146b3d
initial_state: 'on'
initial_state: "on"
trigger:
platform: state
entity_id: binary_sensor.wyzesense_7785d741, binary_sensor.wyzesense_7785cda9
to: 'on'
for: '01:00:00'
to: "on"
for: "01:00:00"
condition:
- condition: template
value_template: "{{ states('input_select.current_house_mode') != 'Away' and states('input_select.current_house_mode') != 'Vacation' }}"
value_template: "{{ states('input_select.current_house_mode') != 'Away' and states('input_select.current_house_mode') != 'Vacation' }}"
- condition: template
value_template: "{{ states('binary_sensor.okay_to_open_windows_and_doors') != True }}"
value_template: "{{ states('binary_sensor.okay_to_open_windows_and_doors') != True }}"
action:
- service: climate.set_preset_mode
data:
entity_id: climate.springville_house
preset_mode: 'Away'
preset_mode: "Away"
- service: persistent_notification.create
data_template:
message: |
Expand All @@ -54,33 +53,33 @@ automation:
title: "Door Left Open"
notification_id: "Open_Door_Thermostat_Setting"

#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - turn off Away mode when they finally close the door
#----------------------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - turn off Away mode when they finally close the door
#----------------------------------------------------------------------------------------------------------

- alias: Door Finally Closed
id: b9bec461-5709-47be-8158-7862b1b5d47a
initial_state: 'on'
initial_state: "on"
trigger:
platform: state
entity_id: binary_sensor.wyzesense_7785d741, binary_sensor.wyzesense_7785cda9
to: 'off'
to: "off"
condition:
- condition: template
value_template: "{{ state_attr('climate.springville_house','preset_mode') == 'Away' }}"
- condition: template
value_template: "{{ states('input_select.current_house_mode') != 'Away' and states('input_select.current_house_mode') != 'Vacation' }}"
value_template: "{{ states('input_select.current_house_mode') != 'Away' and states('input_select.current_house_mode') != 'Vacation' }}"
- condition: state
entity_id: binary_sensor.wyzesense_7785d741
state: 'off'
state: "off"
- condition: state
entity_id: binary_sensor.wyzesense_7785cda9
state: 'off'
state: "off"
action:
- service: climate.set_preset_mode
data:
entity_id: climate.springville_house
preset_mode: 'Home'
preset_mode: "Home"
- service: ecobee.resume_program
data:
entity_id: climate.springville_house
Expand All @@ -93,33 +92,33 @@ automation:
title: "Door Closed"
notification_id: "Open_Door_Thermostat_Setting"

#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - watch for outages
#----------------------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - watch for outages
#----------------------------------------------------------------------------------------------------------

- alias: Reset HVAC Operation Minute Counter
id: fcba1b61-9c15-45bf-ad24-531d98c1be96
initial_state: 'on'
initial_state: "on"
trigger:
platform: state
entity_id: sensor.hvac_operation
action:
- service: counter.reset
entity_id: counter.hvac_operation_minute_counter
- service: counter.reset
entity_id: counter.hvac_operation_minute_counter

- alias: Increment HVAC Operation Minute Counter
id: a36e8298-2dba-4355-bca3-d47cd2bf80d7
initial_state: 'on'
initial_state: "on"
trigger:
platform: time_pattern
minutes: '/1'
minutes: "/1"
action:
- service: counter.increment
entity_id: counter.hvac_operation_minute_counter
- service: counter.increment
entity_id: counter.hvac_operation_minute_counter

- alias: Check HVAC Operation Minute Counter
id: 72dfa84c-a7b7-40c5-b881-997409a46de9
initial_state: 'on'
initial_state: "on"
trigger:
- platform: numeric_state
entity_id: counter.hvac_operation_minute_counter
Expand All @@ -139,7 +138,7 @@ automation:
- condition: sun
after: sunrise
- condition: time
before: '21:00:00'
before: "21:00:00"
action:
- service: persistent_notification.create
data_template:
Expand All @@ -154,35 +153,32 @@ automation:
# topic: 'speak/kitchen_tts'
# payload: 'Please check the thermostat.'



sensor:

#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - show current operating mode
#----------------------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - show current operating mode
#----------------------------------------------------------------------------------------------------------

- platform: template
sensors:
hvac_operation:
friendly_name: HVAC Operation
value_template: "{{ states.climate.springville_house.attributes.hvac_action | capitalize }}"
icon_template: >
{% if states.climate.springville_house.attributes.hvac_action %}
{% if states.climate.springville_house.attributes.hvac_action == 'cool' %}
mdi:air-conditioner
{% elif states.climate.springville_house.attributes.hvac_action == 'heat' %}
mdi:radiator
{% elif states.climate.springville_house.attributes.hvac_action == 'fan' %}
mdi:fan
{% else %}
mdi:fan-off
{% endif %}
{% endif %}
icon_template: >
{% if (states.climate.springville_house != none) and (states.climate.springville_house.attributes.hvac_action) %}
{% if states.climate.springville_house.attributes.hvac_action == 'cool' %}
mdi:air-conditioner
{% elif states.climate.springville_house.attributes.hvac_action == 'heat' %}
mdi:radiator
{% elif states.climate.springville_house.attributes.hvac_action == 'fan' %}
mdi:fan
{% else %}
mdi:fan-off
{% endif %}
{% endif %}
#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - show outside temperature in history
#----------------------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - show outside temperature in history
#----------------------------------------------------------------------------------------------------------

- platform: template
sensors:
Expand All @@ -191,16 +187,15 @@ sensor:
value_template: "{{ states.weather.springville_house.attributes.temperature }}"
device_class: temperature
unit_of_measurement: "°F"

#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - hvac_operation_timer to watch for outages indicated by no changes in operating mode
#----------------------------------------------------------------------------------------------------------

counter:
#----------------------------------------------------------------------------------------------------------
# Ecobee Thermostat - hvac_operation_timer to watch for outages indicated by no changes in operating mode
#----------------------------------------------------------------------------------------------------------

hvac_operation_minute_counter:
icon: mdi:progress-clock
name: HVAC Operation Timer
initial: 0
step: 1
restore: false

Loading

0 comments on commit 3a0c26d

Please sign in to comment.