From e01a037d8d2e60dcfb1c08dda4884ce01a253e7a Mon Sep 17 00:00:00 2001 From: "J.P. Krauss" Date: Sat, 4 Jun 2022 14:22:22 -0700 Subject: [PATCH] Add Climate Package --- packages/climate/README.md | 4 +++ packages/climate/climate.yaml | 63 +++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 packages/climate/README.md create mode 100644 packages/climate/climate.yaml diff --git a/packages/climate/README.md b/packages/climate/README.md new file mode 100644 index 0000000..fcb3f26 --- /dev/null +++ b/packages/climate/README.md @@ -0,0 +1,4 @@ +# Climate Package + +This package contains configuration information for the Z-wave smart thermostat +system. The thermostat should be set up via the UI as `climate.thermostat`. diff --git a/packages/climate/climate.yaml b/packages/climate/climate.yaml new file mode 100644 index 0000000..9ebcc03 --- /dev/null +++ b/packages/climate/climate.yaml @@ -0,0 +1,63 @@ +# Climate Package + +# ----------------------------------------------------------------------------- +# Climate State Helpers +input_select: + climate_mode: + name: Climate Control Mode + options: + - Home + - Night + - Away + - 'Off' + - Manual + +# ----------------------------------------------------------------------------- +# Climate Automations +automation: + +# Automations for Open Windows/Doors + - alias: Turn off HVAC when Doors/Windows Open + mode: queued + trigger: + - platform: state + entity_id: binary_sensor.all_doors + to: 'on' + for: + minutes: 5 + - platform: state + entity_id: binary_sensor.all_windows + to: 'on' + for: + minutes: 5 + action: + - service: scene.create + data: + scene_id: hvac_restore_state + snapshot_entities: + climate.thermostat + - service: climate.set_hvac_mode + target: + entity_id: climate.thermostat + data: + hvac_mode: "off" + + - alias: Restore HVAC when Doors/Windows Closed + mode: queued + trigger: + - platform: state + entity_id: binary_sensor.all_doors + from: 'on' + to: 'off' + for: + minutes: 5 + - platform: state + entity_id: binary_sensor.all_windows + from: 'on' + to: 'off' + for: + minutes: 5 + action: + - service: scene.turn_on + target: + entity_id: scene.hvac_restore_state