From: Giorgio Ravera Date: Fri, 11 Dec 2020 12:21:07 +0000 (+0100) Subject: Added central heating management & netatmo automations X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=a7f2c0de44a95e0771c87a51b70709ea108a0219;p=homeassistant.git Added central heating management & netatmo automations --- diff --git a/.storage/lovelace b/.storage/lovelace index c841927f..ed6c350b 100644 --- a/.storage/lovelace +++ b/.storage/lovelace @@ -468,6 +468,9 @@ }, { "entity": "sensor.rear_balcony_humidity" + }, + { + "entity": "binary_sensor.central_heating" } ], "cards": [ @@ -597,6 +600,32 @@ "hours_to_show": 24, "refresh_interval": 0, "title": "Valvola Camera" + }, + { + "type": "entities", + "title": "Stato Valvole Netatmo", + "entities": [ + { + "entity": "sensor.valve_cucina_state", + "name": "Cucina" + }, + { + "entity": "sensor.valve_sala_state", + "name": "Sala" + }, + { + "entity": "sensor.valve_studio_state", + "name": "Studio" + }, + { + "entity": "sensor.valve_bagno_state", + "name": "Bagno" + }, + { + "entity": "sensor.valve_camera_da_letto_state", + "name": "Camera" + } + ] } ] }, diff --git a/packages/away_mode/away_mode_climate.yaml b/packages/away_mode/away_mode_climate.yaml new file mode 100644 index 00000000..fc407e88 --- /dev/null +++ b/packages/away_mode/away_mode_climate.yaml @@ -0,0 +1,46 @@ +###################################################################### +# Away Mode - Climate Management +###################################################################### + +automation: + + ###################################################################### + # Automation to manage thermostatic valve in away mode + ###################################################################### + - alias: "Modalità Vacanza: Gestione Termosifoni" + + trigger: + - platform: state + entity_id: input_boolean.home_mode_away + to: 'on' + - platform: state + entity_id: input_boolean.home_mode_away + to: 'off' + + condition: [] + + action: + - choose: + # Switch On + - conditions: + - condition: state + entity_id: input_boolean.home_mode_away + state: "on" + sequence: + - service: script.turn_on + data: + entity_id: script.climate_away_mode_on + # Switch Off + - conditions: + - condition: and + conditions: + - condition: state + entity_id: input_boolean.home_mode_away + state: "off" + - condition: state + entity_id: input_boolean.central_heating + state: 'on' + sequence: + - service: script.turn_on + data: + entity_id: script.climate_away_mode_off diff --git a/packages/central_heating.yaml b/packages/central_heating.yaml new file mode 100644 index 00000000..335a31cc --- /dev/null +++ b/packages/central_heating.yaml @@ -0,0 +1,106 @@ +###################################################################### +# Central Heating Package - Binary Sensor +###################################################################### + +binary_sensor: + # Central Heating + - platform: template + sensors: + central_heating: + friendly_name: Riscaldamento Centralizzato + value_template: >- + {{ is_state('input_boolean.central_heating', 'on') }} + icon_template: >- + {% if is_state('input_boolean.central_heating', 'on') %} + mdi:radiator + {% else %} + mdi:radiator-disabled + {% endif %} + +###################################################################### +# Central Heating Package - Binary Sensor +###################################################################### + +input_boolean: + # Central Heating + central_heating: + name: Riscaldamento Centralizzato + icon: mdi:home-thermometer + +###################################################################### +# Central Heating +###################################################################### + +automation: + ###################################################################### + # Climate: Schedule according to Condominium + # - script.turn_on + ###################################################################### + - alias: "Riscaldamento Centralizzato" + + trigger: + - platform: homeassistant + event: start + - platform: time + at: '00:00:00' + - platform: state + entity_id: input_boolean.central_heating + to: 'on' + - platform: state + entity_id: input_boolean.central_heating + to: 'off' + + condition: [] + + action: + - choose: + # Switch on + - conditions: + - condition: template + value_template: "{{ now().month == 11 and now().day == 1 }}" + sequence: + - service: input_boolean.turn_on + data_template: + entity_id: input_boolean.central_heating + - service: script.notify_text + data_template: + title: "Home Assistant - Riscaldamento Centralizzato" + message: "Il riscaldamento centralizzato è stato acceso" + + # Switch off + - conditions: + - condition: template + value_template: "{{ now().month == 4 and now().day == 15 }}" + sequence: + - service: input_boolean.turn_on + data_template: + entity_id: input_boolean.central_heating + - service: script.notify_text + data_template: + title: "Home Assistant - Riscaldamento Centralizzato" + message: "Il riscaldamento centralizzato è stato spento" + +###################################################################### +# Netatmo Package - History +###################################################################### + +history: + exclude: + entities: + - binary_sensor.central_heating + +###################################################################### +# Netatmo Package - Logbook +###################################################################### +logbook: + exclude: + entities: + - binary_sensor.central_heating + +###################################################################### +# Netatmo Package - Recorder +###################################################################### +recorder: + exclude: + entities: + - binary_sensor.central_heating diff --git a/packages/netatmo/netatmo_automations.yaml b/packages/netatmo/netatmo_automations.yaml deleted file mode 100644 index 7be66aff..00000000 --- a/packages/netatmo/netatmo_automations.yaml +++ /dev/null @@ -1,74 +0,0 @@ -###################################################################### -# Netatmo Package - Automations -###################################################################### - -automations: - - ###################################################################### - # Climate: Away Mode On - # - script.turn_on - ###################################################################### - - alias: "Termosifoni: Gestione Modalità vacanza" - - trigger: - - platform: state - entity_id: input_boolean.home_mode_away - to: 'on' - - platform: state - entity_id: input_boolean.home_mode_away - to: 'off' - - condition: [] - - action: - - choose: - # Switch On - - conditions: - - condition: state - entity_id: input_boolean.home_mode_away - state: "on" - sequence: - - service: script.turn_on - data: - entity_id: script.climate_away_mode_on - # Switch Off - - conditions: - - condition: and - conditions: - - condition: state - entity_id: input_boolean.home_mode_away - state: "off" - - condition: template - value_template: "{{ now().month > 10 or now().month < 5 }}" - sequence: - - service: script.turn_on - data: - entity_id: script.climate_away_mode_off - - ###################################################################### - # Climate: Schedule according to Condominium - # - script.turn_on - ###################################################################### - - alias: "Termosifoni: Gestione automatica riscaldamento" - - trigger: - - platform: homeassistant - event: start - - platform: time - at: '00:00:00' - - condition: - condition: or - conditions: - - '{{ now().month == 11 and now().day == 1}}' # Winter - - '{{ now().month == 4 and now().day == 15 }}' # Summer - - action: - - service: script.turn_on - data_template: - entity_id: >- - {% if now().month > 10 or now().month < 5 %} - script.climate_away_mode_off - {% else %} - script.climate_away_mode_on - {% endif %} diff --git a/packages/netatmo/netatmo_customizations.yaml b/packages/netatmo/netatmo_customizations.yaml index 8d6eb2ce..15caa744 100644 --- a/packages/netatmo/netatmo_customizations.yaml +++ b/packages/netatmo/netatmo_customizations.yaml @@ -1,5 +1,5 @@ ###################################################################### -# Customization: Climate +# Netatmo Package - Customization ###################################################################### homeassistant: diff --git a/packages/netatmo/netatmo_engine.yaml b/packages/netatmo/netatmo_engine.yaml new file mode 100644 index 00000000..be338681 --- /dev/null +++ b/packages/netatmo/netatmo_engine.yaml @@ -0,0 +1,105 @@ +###################################################################### +# Netatmo Package - Script +###################################################################### + +script: + ###################################################################### + # Climate: Valve Boost + # Inputs: + # - entity_id + # + # Operations: + # - climate.set_hvac_mode + ###################################################################### + climate_valve_boost: + alias: "Valvole: Boost" + sequence: + - service: climate.set_preset_mode + data_template: + entity_id: "{{ entity_id }}" + preset_mode: boost + - delay: 300 + - service: climate.set_hvac_mode + data_template: + entity_id: "{{ entity_id }}" + hvac_mode: auto + + ###################################################################### + # Climate: Away Mode On + # - service: climate.set_preset_mode + ###################################################################### + climate_away_mode_on: + sequence: + - service: climate.set_preset_mode + data: + entity_id: + - climate.netatmo_cucina + - climate.netatmo_sala + - climate.netatmo_studio + - climate.netatmo_bagno + - climate.netatmo_camera_da_letto + preset_mode: away + + ###################################################################### + # Climate: Away Mode Off + # Note: in summer away mode off is disabled + # - climate.set_hvac_mode + ###################################################################### + climate_away_mode_off: + sequence: + - service: climate.set_hvac_mode + data: + entity_id: + - climate.netatmo_cucina + - climate.netatmo_sala + - climate.netatmo_studio + - climate.netatmo_bagno + - climate.netatmo_camera_da_letto + hvac_mode: auto + +###################################################################### +# Netatmo Package - Script +###################################################################### + +automation: + ###################################################################### + # Climate: Central Away Mode + # - script.turn_on + ###################################################################### + - alias: "Termosifoni: Modalità vacanza centralizzata" + + trigger: + - platform: state + entity_id: input_boolean.central_heating + to: 'on' + - platform: state + entity_id: input_boolean.central_heating + to: 'off' + + condition: [] + + action: + - choose: + # Switch On + - conditions: + - condition: state + entity_id: input_boolean.central_heating + state: "on" + sequence: + - service: script.turn_on + data: + entity_id: script.climate_away_mode_on + # Switch Off + - conditions: + - condition: and + conditions: + - condition: state + entity_id: input_boolean.central_heating + state: "off" + - condition: state + entity_id: input_boolean.home_mode_away + state: 'off' + sequence: + - service: script.turn_on + data: + entity_id: script.climate_away_mode_off diff --git a/packages/netatmo/netatmo_scripts.yaml b/packages/netatmo/netatmo_scripts.yaml deleted file mode 100644 index 2838d631..00000000 --- a/packages/netatmo/netatmo_scripts.yaml +++ /dev/null @@ -1,58 +0,0 @@ -###################################################################### -# Netatmo Package - Script -###################################################################### - -script: - ###################################################################### - # Climate: Valve Boost - # Inputs: - # - entity_id - # - # Operations: - # - climate.set_hvac_mode - ###################################################################### - climate_valve_boost: - alias: "Valvole: Boost" - sequence: - - service: climate.set_preset_mode - data_template: - entity_id: "{{ entity_id }}" - preset_mode: boost - - delay: 300 - - service: climate.set_hvac_mode - data_template: - entity_id: "{{ entity_id }}" - hvac_mode: auto - - ###################################################################### - # Climate: Away Mode On - # - service: climate.set_preset_mode - ###################################################################### - climate_away_mode_on: - sequence: - - service: climate.set_preset_mode - data: - entity_id: - - climate.netatmo_cucina - - climate.netatmo_sala - - climate.netatmo_studio - - climate.netatmo_bagno - - climate.netatmo_camera_da_letto - preset_mode: away - - ###################################################################### - # Climate: Away Mode Off - # Note: in summer away mode off is disabled - # - climate.set_hvac_mode - ###################################################################### - climate_away_mode_off: - sequence: - - service: climate.set_hvac_mode - data: - entity_id: - - climate.netatmo_cucina - - climate.netatmo_sala - - climate.netatmo_studio - - climate.netatmo_bagno - - climate.netatmo_camera_da_letto - hvac_mode: auto