]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Added central heating management & netatmo automations
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Fri, 11 Dec 2020 12:21:07 +0000 (13:21 +0100)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Fri, 11 Dec 2020 12:21:07 +0000 (13:21 +0100)
.storage/lovelace
packages/away_mode/away_mode_climate.yaml [new file with mode: 0644]
packages/central_heating.yaml [new file with mode: 0644]
packages/netatmo/netatmo_automations.yaml [deleted file]
packages/netatmo/netatmo_customizations.yaml
packages/netatmo/netatmo_engine.yaml [new file with mode: 0644]
packages/netatmo/netatmo_scripts.yaml [deleted file]

index c841927f2bdae66b5c8371fe64af5fa88a05b57b..ed6c350b69fdae8da8af058f165c08ff91a53fe5 100644 (file)
                         },
                         {
                             "entity": "sensor.rear_balcony_humidity"
+                        },
+                        {
+                            "entity": "binary_sensor.central_heating"
                         }
                     ],
                     "cards": [
                             "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 (file)
index 0000000..fc407e8
--- /dev/null
@@ -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 (file)
index 0000000..335a31c
--- /dev/null
@@ -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 (file)
index 7be66af..0000000
+++ /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 %}
index 8d6eb2ce5ed3aabc08299a75c4f35ca291ad442c..15caa7440aed50d072d1defa3335acc6181c9794 100644 (file)
@@ -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 (file)
index 0000000..be33868
--- /dev/null
@@ -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 (file)
index 2838d63..0000000
+++ /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