Skip to content

Commit cfbc7ee

Browse files
committed
Add new automation for setting thermostats to eco mode when away and adjust recorder configuration to include Alexa event types. Refactor existing climate automation for improved clarity and functionality.
1 parent 4ce67e8 commit cfbc7ee

4 files changed

Lines changed: 90 additions & 30 deletions

File tree

config/automation/away.yaml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,3 @@
4040
- service: switch.turn_off
4141
entity_id: switch.back_landscaping
4242

43-
44-
# Set thermostats to eco mode when everyone is away
45-
- alias: 'Set Thermostats to Eco When Away'
46-
id: 1e2d3c4b-eco-thermostat-away
47-
mode: single
48-
trigger:
49-
- platform: state
50-
entity_id: group.family
51-
to: 'not_home'
52-
condition:
53-
- condition: state
54-
entity_id: group.family
55-
state: 'not_home'
56-
- condition: state
57-
entity_id: input_boolean.guest_mode
58-
state: 'off'
59-
action:
60-
- service: climate.set_preset_mode
61-
data:
62-
entity_id:
63-
- climate.downstairs
64-
- climate.upstairs
65-
preset_mode: 'eco'
66-
- service: script.notify_engine
67-
data:
68-
title: "Thermostat Eco Mode Triggered"
69-
value1: "DEBUG: Everyone is gone and the Automation was triggered."
70-
who: "carlo"

config/packages/climate.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,4 +179,92 @@ automation:
179179
data:
180180
entity_id: climate.downstairs
181181
temperature: 76
182+
- alias: 'Set Downstairs Thermostat to 79 During Daylight'
183+
id: set_downstairs_thermostat_79_daylight
184+
mode: single
185+
trigger:
186+
- platform: state
187+
entity_id: sun.sun
188+
to: 'above_horizon'
189+
- platform: numeric_state
190+
entity_id: climate.downstairs
191+
attribute: temperature
192+
below: 78
193+
condition:
194+
- condition: state
195+
entity_id: sun.sun
196+
state: 'above_horizon'
197+
- condition: template
198+
value_template: "{{ state_attr('climate.downstairs', 'temperature') < 79 }}"
199+
action:
200+
- service: climate.set_temperature
201+
data:
202+
entity_id: climate.downstairs
203+
temperature: 80
204+
205+
# Set thermostats to eco mode when everyone is away
206+
- alias: 'Set Thermostats to Eco When Away'
207+
id: 1e2d3c4b-eco-thermostat-away
208+
mode: single
209+
trigger:
210+
- platform: state
211+
entity_id: group.family
212+
to: 'not_home'
213+
condition:
214+
- condition: state
215+
entity_id: group.family
216+
state: 'not_home'
217+
- condition: state
218+
entity_id: input_boolean.guest_mode
219+
state: 'off'
220+
action:
221+
- service: climate.set_preset_mode
222+
data:
223+
entity_id:
224+
- climate.downstairs
225+
- climate.upstairs
226+
preset_mode: 'eco'
182227

228+
# Automation: Set Thermostats Back to Cool Mode
229+
- alias: 'Set Thermostats to Cool When Home'
230+
id: 1e2d3c4b-cool-thermostat-home
231+
mode: single
232+
trigger:
233+
- platform: state
234+
entity_id: group.family
235+
to: 'home'
236+
- platform: state
237+
entity_id: person.justin
238+
to: 'home'
239+
condition:
240+
- condition: or
241+
conditions:
242+
- condition: state
243+
entity_id: group.family
244+
state: 'home'
245+
- condition: state
246+
entity_id: person.justin
247+
state: 'home'
248+
- condition: state
249+
entity_id: input_boolean.guest_mode
250+
state: 'off'
251+
action:
252+
- choose:
253+
- conditions:
254+
- condition: state
255+
entity_id: group.family
256+
state: 'home'
257+
sequence:
258+
- service: climate.set_preset_mode
259+
data:
260+
entity_id: climate.downstairs
261+
preset_mode: 'cool'
262+
- conditions:
263+
- condition: state
264+
entity_id: person.justin
265+
state: 'home'
266+
sequence:
267+
- service: climate.set_preset_mode
268+
data:
269+
entity_id: climate.upstairs
270+
preset_mode: 'cool'

config/packages/logger.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# @CCOSTAN
44
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
55
#-------------------------------------------
6-
76
input_select:
87
log_level:
98
name: Log Level
@@ -34,4 +33,3 @@ automation:
3433
- service: logger.set_level
3534
data:
3635
homeassistant.components: "{{ states.input_select.log_level.state }}"
37-

config/recorder.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,5 @@ exclude:
8989
- switch.bear_stone
9090
- switch.alarm_panel_1_screensaver
9191

92+
event_types:
93+
- alexa_smart_home

0 commit comments

Comments
 (0)