diff --git a/packages/climate.yaml b/packages/climate.yaml index 4cd3e58a..59849442 100644 --- a/packages/climate.yaml +++ b/packages/climate.yaml @@ -1,26 +1,148 @@ +# Inspired by https://github.com/downthedeck/hassio-config/blob/master/packages/klimaat.yaml +# Not all modes are supported, as above uses Toon integration +# https://www.home-assistant.io/integrations/generic_thermostat/ +# Generic thermostat currently only supports 'heat', 'cool' and 'off' + +sensor: + - platform: season + type: astronomical + +binary_sensor: + - platform: workday + name: Workday + country: GB + - platform: workday + name: Workday tomorrow + country: GB + days_offset: 1 + automation: - - alias: "Set home temperature" + - alias: "Climate - Away" trigger: - platform: state - entity_id: binary_sensor.home_occupied - from: "off" - to: "on" + entity_id: group.people + to: "not_home" + for: + minutes: 15 action: - - service: climate.set_temperature + - service: climate.set_preset_mode + data: + entity_id: climate.house + preset_mode: "away" + - service: climate.set_preset_mode + data: + entity_id: climate.hot_water + preset_mode: "away" + - service: logbook.log + data_template: + name: EVENT + message: > + Setting heating and hot water thermostat to away mode + + - alias: "Climate - Comfort" + trigger: + - platform: time + at: "19:00:00" + condition: + - condition: state + entity_id: group.people + state: "home" + - condition: template + value_template: '{{ states("sensor.season") != "summer" }}' + action: + - service: climate.set_preset_mode data: entity_id: climate.house - temperature: 19.5 + preset_mode: "none" + - service: climate.set_preset_mode + data: + entity_id: climate.hot_water + preset_mode: "none" + - service: logbook.log + data_template: + name: EVENT + message: > + Setting heating and hot water thermostat to normal mode - - alias: "Set away temperature" + - alias: "Climate - home" trigger: - platform: state - entity_id: binary_sensor.home_occupied - from: "on" - to: "off" - for: - minutes: 5 + entity_id: group.people + to: "home" + condition: + - condition: template + value_template: '{{ states("sensor.season") != "summer" }}' + - condition: time + after: "14:00:00" + action: + - service: climate.set_preset_mode + data: + entity_id: climate.house + preset_mode: "none" + - service: climate.set_preset_mode + data: + entity_id: climate.hot_water + preset_mode: "none" + - service: logbook.log + data_template: + name: EVENT + message: > + Setting heating and hot water thermostat to normal mode + + + - alias: "Climate - Sleep (tomorrow workday)" + trigger: + - platform: time + at: "21:00:00" + condition: + - condition: state + entity_id: binary_sensor.workday_tomorrow + state: "on" + action: + - service: climate.set_temperature + data: + entity_id: climate.house + temperature: 17 + - service: logbook.log + data_template: + name: EVENT + message: > + Setting heating low for sleeping + + - alias: "Climate - Sleep (tomorrow not workday)" + trigger: + - platform: time + at: "23:00:00" + condition: + - condition: state + entity_id: binary_sensor.workday_tomorrow + state: "off" + action: + - service: climate.set_temperature + data: + entity_id: climate.house + temperature: 17 + - service: logbook.log + data_template: + name: EVENT + message: > + Setting heating low for sleeping + + - alias: "Climate - Morning" + trigger: + - platform: time + at: "07:00:00" + condition: + - condition: state + entity_id: binary_sensor.workday_tomorrow + state: "on" action: - service: climate.set_temperature data: entity_id: climate.house - temperature: 12 \ No newline at end of file + temperature: 20 + - service: logbook.log + data_template: + name: EVENT + message: > + Warming the house up for the morning. \ No newline at end of file