From: Giorgio Ravera Date: Fri, 11 Dec 2020 08:49:03 +0000 (+0100) Subject: Replaced EQ3 Max with Netatmo Valves X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=77b6b854a3198d6dea7f6c4f330eb90aaeb1f12f;p=homeassistant.git Replaced EQ3 Max with Netatmo Valves --- diff --git a/.secrets_travis.yaml b/.secrets_travis.yaml index fc80ad16..0c3aec87 100644 --- a/.secrets_travis.yaml +++ b/.secrets_travis.yaml @@ -47,3 +47,6 @@ docker_username: user darksky_key: 0 hacs_token: 0 + +netatmo_client_id: client_id +netatmo_client_secret: password diff --git a/.storage/lovelace b/.storage/lovelace index 1bd908cc..c841927f 100644 --- a/.storage/lovelace +++ b/.storage/lovelace @@ -55,7 +55,7 @@ "entity": "cover.tapparella_cucina" }, { - "entity": "climate.cucina_termostato_cucina" + "entity": "climate.netatmo_cucina" }, { "entity": "media_player.google_home" @@ -82,7 +82,7 @@ "entity": "cover.tapparella_sala" }, { - "entity": "climate.sala_termostato_sala" + "entity": "climate.netatmo_sala" }, { "entity": "media_player.sony_bravia_tv" @@ -121,7 +121,7 @@ "entity": "light.luce_specchio" }, { - "entity": "climate.bagno_termostato_bagno" + "entity": "climate.netatmo_bagno" } ], "entity": "light.luci_bagno", @@ -142,7 +142,7 @@ "entity": "cover.tapparella_studio" }, { - "entity": "climate.studio_termostato_studio" + "entity": "climate.netatmo_studio" } ], "entity": "light.luce_studio", @@ -163,7 +163,7 @@ "entity": "cover.tapparella_camera" }, { - "entity": "climate.camera_termostato_camera" + "entity": "climate.netatmo_camera_da_letto" } ], "entity": "light.luce_camera", @@ -438,32 +438,57 @@ "title": "Tapparelle" }, { + "icon": "mdi:thermometer", + "id": "climate", + "title": "Termostato", "badges": [ - "sensor.termostato_cucina", - "sensor.termostato_sala", - "sensor.termostato_bagno", - "sensor.termostato_studio", - "sensor.termostato_camera" + { + "entity": "sensor.valve_cucina_temperature" + }, + { + "entity": "sensor.valve_sala_temperature" + }, + { + "entity": "sensor.valve_bagno_temperature" + }, + { + "entity": "sensor.valve_studio_temperature" + }, + { + "entity": "sensor.valve_camera_da_letto_temperature" + }, + { + "entity": "sensor.front_balcony_temperature" + }, + { + "entity": "sensor.rear_balcony_temperature" + }, + { + "entity": "sensor.front_balcony_humidity" + }, + { + "entity": "sensor.rear_balcony_humidity" + } ], "cards": [ { - "entity": "climate.cucina_termostato_cucina", + "entity": "climate.netatmo_cucina", "type": "thermostat" }, { - "entity": "climate.sala_termostato_sala", + "entity": "climate.netatmo_sala", "type": "thermostat" }, { - "entity": "climate.bagno_termostato_bagno", + "entity": "climate.netatmo_bagno", "type": "thermostat" }, { - "entity": "climate.studio_termostato_studio", + "entity": "climate.netatmo_studio", "type": "thermostat" }, { - "entity": "climate.camera_termostato_camera", + "entity": "climate.netatmo_camera_da_letto", "type": "thermostat" }, { @@ -471,62 +496,109 @@ { "action_name": "Attiva Boost", "name": "Cucina", - "service": "climate.set_preset_mode", + "service": "script.climate_valve_boost", "service_data": { - "entity_id": "climate.cucina_termostato_cucina", - "preset_mode": "boost" + "entity_id": "climate.netatmo_cucina" }, "type": "call-service" }, { "action_name": "Attiva Boost", "name": "Sala", - "service": "climate.set_preset_mode", + "service": "script.climate_valve_boost", "service_data": { - "entity_id": "climate.sala_termostato_sala", - "preset_mode": "boost" + "entity_id": "climate.netatmo_sala" }, "type": "call-service" }, { "action_name": "Attiva Boost", "name": "Bagno", - "service": "climate.set_preset_mode", + "service": "script.climate_valve_boost", "service_data": { - "entity_id": "climate.bagno_termostato_bagno", - "preset_mode": "boost" + "entity_id": "climate.netatmo_bagno" }, "type": "call-service" }, { "action_name": "Attiva Boost", "name": "Studio", - "service": "climate.set_preset_mode", + "service": "script.climate_valve_boost", "service_data": { - "entity_id": "climate.studio_termostato_studio", - "preset_mode": "boost" + "entity_id": "climate.netatmo_studio" }, "type": "call-service" }, { "action_name": "Attiva Boost", "name": "Camera", - "service": "climate.set_preset_mode", + "service": "script.climate_valve_boost", "service_data": { - "entity_id": "climate.camera_termostato_camera", - "preset_mode": "boost" + "entity_id": "climate.netatmo_camera_da_letto" }, "type": "call-service" } ], "show_header_toggle": false, - "title": "Operazione sui Dispositivi", + "title": "Operazioni", "type": "entities" + }, + { + "type": "history-graph", + "entities": [ + { + "entity": "climate.netatmo_cucina" + } + ], + "hours_to_show": 24, + "refresh_interval": 0, + "title": "Valvola Cucina" + }, + { + "type": "history-graph", + "entities": [ + { + "entity": "climate.netatmo_sala" + } + ], + "hours_to_show": 24, + "refresh_interval": 0, + "title": "Valvola Sala" + }, + { + "type": "history-graph", + "entities": [ + { + "entity": "climate.netatmo_studio" + } + ], + "hours_to_show": 24, + "refresh_interval": 0, + "title": "Valvola Studio" + }, + { + "type": "history-graph", + "entities": [ + { + "entity": "climate.netatmo_bagno" + } + ], + "hours_to_show": 24, + "refresh_interval": 0, + "title": "Valvola Bagno" + }, + { + "type": "history-graph", + "entities": [ + { + "entity": "climate.netatmo_camera_da_letto" + } + ], + "hours_to_show": 24, + "refresh_interval": 0, + "title": "Valvola Camera" } - ], - "icon": "mdi:thermometer", - "id": "climate", - "title": "Termostato" + ] }, { "badges": [ @@ -749,12 +821,6 @@ "badges": [ { "entity": "sun.sun" - }, - { - "entity": "sensor.front_balcony_temperature" - }, - { - "entity": "sensor.rear_balcony_temperature" } ], "cards": [ @@ -765,30 +831,6 @@ { "entity": "weather.meteo_morgex", "type": "weather-forecast" - }, - { - "entities": [ - { - "entity": "sensor.front_balcony_temperature" - }, - { - "entity": "sensor.front_balcony_humidity" - } - ], - "title": "Balcone", - "type": "entities" - }, - { - "entities": [ - { - "entity": "sensor.rear_balcony_temperature" - }, - { - "entity": "sensor.rear_balcony_humidity" - } - ], - "title": "Veranda", - "type": "entities" } ] } diff --git a/.storage/lovelace.lovelace_dispositivi b/.storage/lovelace.lovelace_dispositivi index 0833de3e..99940b04 100644 --- a/.storage/lovelace.lovelace_dispositivi +++ b/.storage/lovelace.lovelace_dispositivi @@ -186,6 +186,70 @@ ] } ] + }, + { + "title": "Netatmo", + "path": "netatmo", + "icon": "mdi:alpha-n-box", + "badges": [], + "cards": [ + { + "type": "picture", + "image": "/local/images/devices/netatmo_valve.png" + }, + { + "type": "custom:battery-state-card", + "title": "Batteria Valvole Netatmo", + "entities": [ + { + "entity": "sensor.valve_cucina_battery", + "name": "Cucina" + }, + { + "entity": "sensor.valve_sala_battery", + "name": "Sala" + }, + { + "entity": "sensor.valve_studio_battery", + "name": "Studio" + }, + { + "entity": "sensor.valve_bagno_battery", + "name": "Bagno" + }, + { + "entity": "sensor.valve_camera_da_letto_battery", + "name": "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" + } + ] + } + ] } ], "title": "Dispositivi" diff --git a/README.md b/README.md index 451b99a7..ba4df3fa 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ My server is an Intel NUC (NUC5i5RYH) with [XCP-ng Hypervisor](https://xcp-ng.or * Google (Chromecast, Google Home Mini) * Shelly (Shelly1, Shelly2, Shelly2.5, ShellyEM, Shelly Dimmer) * Xiaomi (MiJia door & window contact sensor, MiJia temperature & humidity sensor) -* MAX! eQ-3 (Thermostatic valve) +* Netatmo Thermostatic valves +* ~~MAX! eQ-3 (Thermostatic valve)~~ * Sony Android TV (KD-55XF8596) * Canon Printer (TR8550) * QNAP NAS (TS-228A) @@ -32,6 +33,7 @@ My server is an Intel NUC (NUC5i5RYH) with [XCP-ng Hypervisor](https://xcp-ng.or * Create Users/People * Configure the following integrations using UI: * Certificate Expiry + * Google Calendar * Google Cast * HACS * Internet Printing Protocol @@ -47,6 +49,7 @@ All files are edited with [Visual Studio Code](https://code.visualstudio.com/). All files are tested using the latest stable version of Home Assistant using [Travis](https://travis-ci.com/github/xraver/homeassistant). ## To Do List +* Netatmo automations * Script review ([Native types support for templates](https://www.home-assistant.io/blog/2020/10/28/release-117/#native-types-support-for-templates-beta) after release 117) * NFC * Lovelace: @@ -82,4 +85,4 @@ All files are tested using the latest stable version of Home Assistant using [Tr [last-commit-url]: https://github.com/xraver/homeassistant/commits/master [buymecoffee-img]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg [buymecoffee-button]: https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg -[buymecoffee-url]: https://www.buymeacoffee.com/raverag \ No newline at end of file +[buymecoffee-url]: https://www.buymeacoffee.com/raverag diff --git a/automations/climate.yaml b/automations/climate.yaml index fc8aa6a5..e525706a 100644 --- a/automations/climate.yaml +++ b/automations/climate.yaml @@ -1,122 +1,67 @@ ###################################################################### -# Climate: Weekly Schedule -# - script.climate_daily_schedule +# Climate: Away Mode On +# - script.turn_on ###################################################################### -- alias: "Termosifoni: Schedulazione giornaliera feriale" - initial_state: false +- alias: "Termosifoni: Attiva Modalità vacanza" trigger: - - platform: time - at: '06:30:00' - - platform: time - at: '07:30:00' - - platform: time - at: '09:00:00' - - platform: time - at: '18:30:00' - - platform: time - at: '22:00:00' -# - platform: state -# entity_id: input_boolean.home_mode_away -# to: 'off' - - condition: - condition: and - conditions: - - condition: state - entity_id: input_boolean.home_mode_away - state: 'off' + - platform: state + entity_id: input_boolean.home_mode_away + to: 'on' - - condition: time - weekday: [mon, tue, wed, thu, fri] + condition: [] action: - - service: script.climate_daily_schedule - data_template: - entity_id: climate.cucina_termostato_cucina - temp1: 20 - temp2: 18 - temp3: 20 - temp4: 20.5 - temp5: 16 - - - service: script.climate_daily_schedule - data_template: - entity_id: climate.sala_termostato_sala - temp1: 18 - temp2: 18 - temp3: 19.5 - temp4: 20 - temp5: 16 - - - service: script.climate_daily_schedule - data_template: - entity_id: climate.bagno_termostato_bagno - temp1: 19 - temp2: 18 - temp3: 19 - temp4: 19.5 - temp5: 16 - - - service: script.climate_daily_schedule - data_template: - entity_id: climate.studio_termostato_studio - temp1: 18 - temp2: 18 - temp3: 19.5 - temp4: 20 - temp5: 16 - - - service: script.climate_daily_schedule - data_template: - entity_id: climate.camera_termostato_camera - temp1: 19 - temp2: 18 - temp3: 19 - temp4: 19.5 - temp5: 16 + - service: script.turn_on + data: + entity_id: script.climate_away_mode_on ###################################################################### -# Climate: Away Mode -# - climate.set_operation_mode -# - climate.set_temperature +# Climate: Away Mode Off +# Note: in summer away mode off is disabled +# - climate.set_hvac_mode ###################################################################### -- alias: "Termosifoni: Modalità vacanza" - initial_state: false +- alias: "Termosifoni: Disattiva 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: [] + condition: "{{ now().month > 10 or now().month < 5 }}" action: - - service: script.climate_away_mode - data_template: - entity_id: climate.cucina_termostato_cucina + - service: script.turn_on + data: + entity_id: script.climate_away_mode_off - - service: script.climate_away_mode - data_template: - entity_id: climate.sala_termostato_sala - mode: trigger.to_state.state +###################################################################### +# Climate: Schedule according to Condominium +# - script.turn_on +###################################################################### - - service: script.climate_away_mode - data_template: - entity_id: climate.bagno_termostato_bagno - mode: trigger.to_state.state - - - service: script.climate_away_mode - data_template: - entity_id: climate.studio_termostato_studio - mode: trigger.to_state.state - - - service: script.climate_away_mode +- 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: climate.camera_termostato_camera - mode: trigger.to_state.state + 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/components/google_assistant/climate.yaml b/components/google_assistant/climate.yaml index 6fa3837f..e440f496 100644 --- a/components/google_assistant/climate.yaml +++ b/components/google_assistant/climate.yaml @@ -2,18 +2,18 @@ # Google Assistant: Climate ###################################################################### -climate.bagno_termostato_bagno: - expose: true - room: Bagno -climate.camera_termostato_camera: - expose: true - room: Camera -climate.cucina_termostato_cucina: +climate.netatmo_cucina: expose: true room: Cucina -climate.sala_termostato_sala: +climate.netatmo_sala: expose: true room: Sala -climate.studio_termostato_studio: +climate.netatmo_studio: expose: true room: Studio +climate.netatmo_bagno: + expose: true + room: Bagno +climate.netatmo_camera_da_letto: + expose: true + room: Camera diff --git a/components/netatmo.yaml b/components/netatmo.yaml new file mode 100644 index 00000000..bfccae5d --- /dev/null +++ b/components/netatmo.yaml @@ -0,0 +1,6 @@ +###################################################################### +# Component: Netatmo +###################################################################### + +client_id: !secret netatmo_client_id +client_secret: !secret netatmo_client_secret diff --git a/configuration.yaml b/configuration.yaml index adc338de..636080bf 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -184,8 +184,8 @@ weather: !include components/weather.yaml # MQTT (moved to UI) #mqtt: !include components/mqtt.yaml -# EQ3 Max Cube -maxcube: !include components/eq3max.yaml +# Netatmo +netatmo: !include components/netatmo.yaml # Google Assistant google_assistant: !include components/google_assistant.yaml diff --git a/customizations/climate.yaml b/customizations/climate.yaml index 90d013e8..43f13440 100644 --- a/customizations/climate.yaml +++ b/customizations/climate.yaml @@ -1,18 +1,18 @@ ###################################################################### -# Customization: MAX EQ3 +# Customization: Climate ###################################################################### -climate.cucina_termostato_cucina: - friendly_name: Termostato Cucina +climate.netatmo_cucina: + friendly_name: Valvola Cucina -climate.sala_termostato_sala: - friendly_name: Termostato Sala +climate.netatmo_sala: + friendly_name: Valvola Sala -climate.bagno_termostato_bagno: - friendly_name: Termostato Bagno +climate.netatmo_bagno: + friendly_name: Valvola Bagno -climate.studio_termostato_studio: - friendly_name: Termostato Studio +climate.netatmo_studio: + friendly_name: Valvola Studio -climate.camera_termostato_camera: - friendly_name: Termostato Camera +climate.netatmo_camera_da_letto: + friendly_name: Valvola Camera diff --git a/groups/climate.yaml b/groups/climate.yaml index 8f68f5da..a2112f02 100644 --- a/groups/climate.yaml +++ b/groups/climate.yaml @@ -6,8 +6,8 @@ climate: name: Termostato icon: mdi:thermometer entities: - - sensor.termostato_cucina - - sensor.termostato_sala - - sensor.termostato_bagno - - sensor.termostato_studio - - sensor.termostato_camera + - climate.netatmo_cucina + - climate.netatmo_sala + - climate.netatmo_studio + - climate.netatmo_bagno + - climate.netatmo_camera_da_letto diff --git a/log/history.yaml b/log/history.yaml index b4a61e43..4e7ce518 100644 --- a/log/history.yaml +++ b/log/history.yaml @@ -77,6 +77,17 @@ exclude: - sensor.canon_tr8500_series_cyan - sensor.canon_tr8500_series_magenta - sensor.canon_tr8500_series_yellow + # Netatmo + - sensor.valve_cucina_battery + - sensor.valve_sala_battery + - sensor.valve_studio_battery + - sensor.valve_bagno_battery + - sensor.valve_camera_da_letto_battery + - sensor.valve_cucina_state + - sensor.valve_sala_state + - sensor.valve_studio_state + - sensor.valve_bagno_state + - sensor.valve_camera_da_letto_state domains: - automation - calendar diff --git a/log/logbook.yaml b/log/logbook.yaml index e1c30602..5f79a03c 100644 --- a/log/logbook.yaml +++ b/log/logbook.yaml @@ -77,6 +77,17 @@ exclude: - sensor.canon_tr8500_series_cyan - sensor.canon_tr8500_series_magenta - sensor.canon_tr8500_series_yellow + # Netatmo + - sensor.valve_cucina_battery + - sensor.valve_sala_battery + - sensor.valve_studio_battery + - sensor.valve_bagno_battery + - sensor.valve_camera_da_letto_battery + - sensor.valve_cucina_state + - sensor.valve_sala_state + - sensor.valve_studio_state + - sensor.valve_bagno_state + - sensor.valve_camera_da_letto_state domains: - automation - calendar diff --git a/log/recorder.yaml b/log/recorder.yaml index c5ae3902..111b7671 100644 --- a/log/recorder.yaml +++ b/log/recorder.yaml @@ -79,6 +79,17 @@ exclude: - sensor.canon_tr8500_series_cyan - sensor.canon_tr8500_series_magenta - sensor.canon_tr8500_series_yellow + # Netatmo + - sensor.valve_cucina_battery + - sensor.valve_sala_battery + - sensor.valve_studio_battery + - sensor.valve_bagno_battery + - sensor.valve_camera_da_letto_battery + - sensor.valve_cucina_state + - sensor.valve_sala_state + - sensor.valve_studio_state + - sensor.valve_bagno_state + - sensor.valve_camera_da_letto_state domains: - automation - calendar diff --git a/scripts/climate.yaml b/scripts/climate.yaml index 704c5d73..af5d447d 100644 --- a/scripts/climate.yaml +++ b/scripts/climate.yaml @@ -1,91 +1,55 @@ ###################################################################### -# Climate: Daily Schedule +# Climate: Valve Boost # Inputs: # - entity_id -# - temp1 -# - temp2 -# - temp3 -# - temp4 -# - temp5 # # Operations: -# - climate.set_temperature +# - climate.set_hvac_mode ###################################################################### - -climate_daily_schedule: - alias: "Termosifoni: Schedulazione giornaliera" +climate_valve_boost: + alias: "Valvole: Boost" sequence: - - service: climate.set_temperature + #- service: climate.set_hvac_mode + - service: climate.set_preset_mode + data_template: + entity_id: "{{ entity_id }}" + #hvac_mode: heat + preset_mode: boost + - delay: 300 + - service: climate.set_hvac_mode data_template: entity_id: "{{ entity_id }}" - temperature: >- - {% set current_date_string = now().strftime("%H%M") %} - {% set time1_string = "0630" %} - {% set time2_string = "0730" %} - {% set time3_string = "0900" %} - {% set time4_string = "1830" %} - {% set time5_string = "2200" %} - {% if ((current_date_string|int) >= (time1_string|int)) and ((current_date_string|int) < (time2_string|int)) %} - {{ temp1 }} - {% elif ((current_date_string|int) >= (time2_string|int)) and ((current_date_string|int) < (time3_string|int)) %} - {{ temp2 }} - {% elif ((current_date_string|int) >= (time3_string|int)) and ((current_date_string|int) < (time4_string|int)) %} - {{ temp3 }} - {% elif ((current_date_string|int) >= (time4_string|int)) and ((current_date_string|int) < (time5_string|int)) %} - {{ temp4 }} - {% else %} - {{ temp5 }} - {% endif %} + hvac_mode: auto ###################################################################### # Climate: Away Mode On -# Inputs: -# - entity_id -# - mode -# -# Operations: -# - climate.set_operation_mode -# - climate.set_temperature +# - service: climate.set_preset_mode ###################################################################### - climate_away_mode_on: - alias: "Termosifoni: Attviva Modalità vacanza" sequence: - service: climate.set_preset_mode - data_template: - entity_id: "{{ entity_id }}" - preset_mode: manual - - delay: '00:00:5' - - service: climate.set_temperature - data_template: - entity_id: "{{ entity_id }}" - temperature: 5 - - delay: '00:00:5' - - service: climate.set_preset_mode - data_template: - entity_id: "{{ entity_id }}" - preset_mode: vacation - - delay: '00:00:5' - - service: climate.set_preset_mode - data_template: - entity_id: "{{ entity_id }}" - preset_mode: vacation + 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 -# Inputs: -# - entity_id -# - mode -# -# Operations: -# - climate.set_operation_mode -# - climate.set_temperature +# Note: in summer away mode off is disabled +# - climate.set_hvac_mode ###################################################################### - climate_away_mode_off: - alias: "Termosifoni: Disattiva Modalità vacanza" sequence: - - service: climate.set_preset_mode - data_template: - entity_id: "{{ entity_id }}" - preset_mode: auto + - 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 diff --git a/sensor/climates.yaml b/sensor/climates.yaml index 57548d28..36701b6a 100644 --- a/sensor/climates.yaml +++ b/sensor/climates.yaml @@ -1,38 +1,151 @@ ###################################################################### -# Sensor: Temperature from Radiator Thermostat +# Sensor: Temperature from Radiator Valve ###################################################################### - platform: template sensors: - termostato_cucina: - friendly_name: "Cucina" - value_template: "{{ state_attr('climate.cucina_termostato_cucina', 'current_temperature') }}" + valve_cucina_temperature: + friendly_name: "Temperatura Cucina" + value_template: "{{ state_attr('climate.netatmo_cucina', 'current_temperature') }}" unit_of_measurement: '°C' + device_class: temperature - platform: template sensors: - termostato_sala: - friendly_name: "Sala" - value_template: "{{ state_attr('climate.sala_termostato_sala', 'current_temperature') }}" + valve_sala_temperature: + friendly_name: "Temperatura Sala" + value_template: "{{ state_attr('climate.netatmo_sala', 'current_temperature') }}" unit_of_measurement: '°C' + device_class: temperature - platform: template sensors: - termostato_bagno: - friendly_name: "Bagno" - value_template: "{{ state_attr('climate.bagno_termostato_bagno', 'current_temperature') }}" - unit_of_measurement: '°C' + valve_studio_temperature: + friendly_name: "Temperatura Studio" + value_template: "{{ state_attr('climate.netatmo_studio', 'current_temperature') }}" + unit_of_measurement: '°C' + device_class: temperature - platform: template sensors: - termostato_studio: - friendly_name: "Studio" - value_template: "{{ state_attr('climate.studio_termostato_studio', 'current_temperature') }}" + valve_bagno_temperature: + friendly_name: "Temperatura Bagno" + value_template: "{{ state_attr('climate.netatmo_bagno', 'current_temperature') }}" unit_of_measurement: '°C' + device_class: temperature - platform: template sensors: - termostato_camera: - friendly_name: "Camera" - value_template: "{{ state_attr('climate.camera_termostato_camera', 'current_temperature') }}" + valve_camera_da_letto_temperature: + friendly_name: "Temperatura Camera" + value_template: "{{ state_attr('climate.netatmo_camera_da_letto', 'current_temperature') }}" unit_of_measurement: '°C' + device_class: temperature + +###################################################################### +# Sensor: Battery from Radiator Valve +###################################################################### + +- platform: template + sensors: + valve_cucina_battery: + friendly_name: "Batteria Valvola Cucina" + value_template: "{{ state_attr('climate.netatmo_cucina', 'battery_level') }}" + unit_of_measurement: '%' + device_class: battery + +- platform: template + sensors: + valve_sala_battery: + friendly_name: "Batteria Valvola Sala" + value_template: "{{ state_attr('climate.netatmo_sala', 'battery_level') }}" + unit_of_measurement: '%' + device_class: battery + +- platform: template + sensors: + valve_studio_battery: + friendly_name: "Batteria Valvola Studio" + value_template: "{{ state_attr('climate.netatmo_studio', 'battery_level') }}" + unit_of_measurement: '%' + device_class: battery + +- platform: template + sensors: + valve_bagno_battery: + friendly_name: "Batteria Valvola Bagno" + value_template: "{{ state_attr('climate.netatmo_bagno', 'battery_level') }}" + unit_of_measurement: '%' + device_class: battery + +- platform: template + sensors: + valve_camera_da_letto_battery: + friendly_name: "Batteria Valvola Camera" + value_template: "{{ state_attr('climate.netatmo_camera_da_letto', 'battery_level') }}" + unit_of_measurement: '%' + device_class: battery + +###################################################################### +# Sensor: State from Radiator Valve +###################################################################### + +- platform: template + sensors: + valve_cucina_state: + friendly_name: "Stato Valvola Cucina" + value_template: "{{ state_attr('climate.netatmo_cucina', 'hvac_action') }}" + icon_template: >- + {% if is_state_attr('climate.netatmo_cucina', 'hvac_action', 'idle') %} + mdi:radiator-disabled + {% else %} + mdi:radiator + {% endif %} + +- platform: template + sensors: + valve_sala_state: + friendly_name: "Stato Valvola Sala" + value_template: "{{ state_attr('climate.netatmo_sala', 'hvac_action') }}" + icon_template: >- + {% if is_state_attr('climate.netatmo_sala', 'hvac_action', 'idle') %} + mdi:radiator-disabled + {% else %} + mdi:radiator + {% endif %} + +- platform: template + sensors: + valve_studio_state: + friendly_name: "Stato Valvola Studio" + value_template: "{{ state_attr('climate.netatmo_studio', 'hvac_action') }}" + icon_template: >- + {% if is_state_attr('climate.netatmo_studio', 'hvac_action', 'idle') %} + mdi:radiator-disabled + {% else %} + mdi:radiator + {% endif %} + +- platform: template + sensors: + valve_bagno_state: + friendly_name: "Stato Valvola Bagno" + value_template: "{{ state_attr('climate.netatmo_bagno', 'hvac_action') }}" + icon_template: >- + {% if is_state_attr('climate.netatmo_bagno', 'hvac_action', 'idle') %} + mdi:radiator-disabled + {% else %} + mdi:radiator + {% endif %} + +- platform: template + sensors: + valve_camera_da_letto_state: + friendly_name: "Stato Valvola Camera" + value_template: "{{ state_attr('climate.netatmo_camera_da_letto', 'hvac_action') }}" + icon_template: >- + {% if is_state_attr('climate.netatmo_camera_da_letto', 'hvac_action', 'idle') %} + mdi:radiator-disabled + {% else %} + mdi:radiator + {% endif %} diff --git a/www/images/devices/netatmo_valve.png b/www/images/devices/netatmo_valve.png new file mode 100644 index 00000000..2f736179 Binary files /dev/null and b/www/images/devices/netatmo_valve.png differ