diff --git a/.ha_run.lock b/.ha_run.lock index 306b3c9..07fc1c2 100644 --- a/.ha_run.lock +++ b/.ha_run.lock @@ -1 +1 @@ -{"pid": 67, "version": 1, "ha_version": "2025.10.4", "start_ts": 1762379484.0212016} \ No newline at end of file +{"pid": 68, "version": 1, "ha_version": "2025.10.4", "start_ts": 1764005948.2089655} \ No newline at end of file diff --git a/automations.yaml b/automations.yaml index 61b4114..a983ffc 100644 --- a/automations.yaml +++ b/automations.yaml @@ -1,4 +1,4 @@ -- id: "1729875991469" +- id: '1729875991469' alias: BagnoOvest-save-energy description: Thermostat will close upon window open use_blueprint: @@ -6,27 +6,27 @@ input: window_sensor: binary_sensor.bagnoovest_finestra_contact climate_target: climate.bagnoovest_termosifone -- id: "1729887529602" +- id: '1729887529602' alias: BagnoPT-save-energy - description: "" + description: '' use_blueprint: path: homeassistant/heat_save.yaml input: window_sensor: binary_sensor.bagnopt_finestra_contact climate_target: climate.bagnopt_termosifone ext_temp_limit: 17 -- id: "1729887632269" +- id: '1729887632269' alias: SoggiornoPT-save-energy - description: "" + description: '' use_blueprint: path: homeassistant/heat_save.yaml input: window_sensor: binary_sensor.soggiornopt_finestrasud_contact climate_target: climate.soggiornopt_termosifonesud ext_temp_limit: 17 -- id: "1731705145404" +- id: '1731705145404' alias: Luce Automatica Scala Mansarda - description: "" + description: '' use_blueprint: path: homeassistant/motion_light_dual_ng.yaml input: @@ -35,9 +35,9 @@ light_target: device_id: 702137a6f2c17b89fdb0598f7003743c no_motion_wait: 30 -- id: "1732739522749" +- id: '1732739522749' alias: Luce Automatica Taverna Garage - description: "" + description: '' use_blueprint: path: homeassistant/motion_light_trix_ng.yaml input: @@ -49,17 +49,17 @@ use_sun: false dont_disturb: false no_motion_wait: 40 -- id: "1736805701473" +- id: '1736805701473' alias: P1confort-light - description: "" + description: '' use_blueprint: path: homeassistant/confort_light.yaml input: light_target: device_id: e0397b54f1c2d1514be403e2996ca368 -- id: "1738366774549" +- id: '1738366774549' alias: Test-motion-light-ng - description: "" + description: '' use_blueprint: path: homeassistant/motion_light_dual_ng.yaml input: @@ -69,23 +69,22 @@ device_id: 9f46c5b7c07f1495e0f4bf8d6f72a525 no_motion_wait: 0 dont_disturb: false -- id: "1738426726761" +- id: '1738426726761' alias: Test-Pulsante01 - description: "" + description: '' use_blueprint: path: homeassistant/button_action.yaml input: light_target: entity_id: light.test_lamp1 -- id: "1739393696392" +- id: '1739393696392' alias: Power-load-high - description: "" + description: '' use_blueprint: path: homeassistant/power-load-high.yaml -- id: "1740247429602" +- id: '1740247429602' alias: EVcharge-process - description: - Manage charge of 2 cars sequentially via 2 controlled plugs (requires + description: Manage charge of 2 cars sequentially via 2 controlled plugs (requires power and energy entities) use_blueprint: path: homeassistant/evcharge-process.yaml @@ -95,14 +94,14 @@ use_entity1: input_boolean.evcharge_front_request use_entity2: input_boolean.evcharge_back_request start_button: input_button.evcharge_start -- id: "1740332596550" +- id: '1740332596550' alias: test-email - description: "" + description: '' use_blueprint: path: homeassistant/test_macro.yaml -- id: "1748185066312" +- id: '1748185066312' alias: Luce-Garage - description: "" + description: '' use_blueprint: path: homeassistant/presence_light.yaml input: @@ -112,79 +111,79 @@ use_sun: false dont_disturb: false no_presence_wait: 180 -- id: "1753031203413" +- id: '1753031203413' alias: Apri-Cancelletto - description: "" + description: '' triggers: - - trigger: state - entity_id: - - input_button.apri_cancelletto + - trigger: state + entity_id: + - input_button.apri_cancelletto conditions: [] actions: - - action: switch.turn_on - metadata: {} - data: {} - target: - device_id: 4a76297a493304816b1084c6979f4801 - - delay: - hours: 0 - minutes: 0 - seconds: 0 - milliseconds: 200 - - action: switch.turn_off - metadata: {} - data: {} - target: - device_id: 4a76297a493304816b1084c6979f4801 - - delay: - hours: 0 - minutes: 0 - seconds: 2 - milliseconds: 0 - - action: switch.turn_off - metadata: {} - data: {} - target: - device_id: 4a76297a493304816b1084c6979f4801 + - action: switch.turn_on + metadata: {} + data: {} + target: + device_id: 4a76297a493304816b1084c6979f4801 + - delay: + hours: 0 + minutes: 0 + seconds: 0 + milliseconds: 200 + - action: switch.turn_off + metadata: {} + data: {} + target: + device_id: 4a76297a493304816b1084c6979f4801 + - delay: + hours: 0 + minutes: 0 + seconds: 2 + milliseconds: 0 + - action: switch.turn_off + metadata: {} + data: {} + target: + device_id: 4a76297a493304816b1084c6979f4801 mode: single -- id: "1753371588861" +- id: '1753371588861' alias: Cancelletto Alert - description: "" + description: '' triggers: - - trigger: state - entity_id: - - binary_sensor.cancelletto_visitor - to: "on" + - trigger: state + entity_id: + - binary_sensor.cancelletto_visitor + to: 'on' conditions: [] actions: - - device_id: 61ac46de1cc773e1b7d5faa379ee465b - domain: mobile_app - type: notify - message: Qualcuno ha suonato al Cancelletto usa Home Assistant - - device_id: f0ad21f704179a15735313abaa4bd548 - domain: mobile_app - type: notify - message: Qualcuno ha suonato al Cancelletto usa Home Assistant - enabled: false - - device_id: 46e6c7b252a23f498de8602ca380d0a9 - domain: mobile_app - type: notify - message: Qualcuno ha suonato al Cancelletto usa Home Assistant - enabled: true - - device_id: 163daed9ae6074cfa3a10b866ab5d2e0 - domain: mobile_app - type: notify - message: Qualcuno ha suonato al Cancelletto usa Home Assistant - enabled: false - - device_id: 8836f21983cdb6b245d3be58d7acd7d7 - domain: mobile_app - type: notify - message: Qualcuno ha suonato al Cancelletto usa Home Assistant - enabled: false + - device_id: 61ac46de1cc773e1b7d5faa379ee465b + domain: mobile_app + type: notify + message: Qualcuno ha suonato al Cancelletto usa Home Assistant + - device_id: f0ad21f704179a15735313abaa4bd548 + domain: mobile_app + type: notify + message: Qualcuno ha suonato al Cancelletto usa Home Assistant + enabled: false + - device_id: 46e6c7b252a23f498de8602ca380d0a9 + domain: mobile_app + type: notify + message: Qualcuno ha suonato al Cancelletto usa Home Assistant + enabled: true + - device_id: 163daed9ae6074cfa3a10b866ab5d2e0 + domain: mobile_app + type: notify + message: Qualcuno ha suonato al Cancelletto usa Home Assistant + enabled: false + - device_id: 8836f21983cdb6b245d3be58d7acd7d7 + domain: mobile_app + type: notify + message: Qualcuno ha suonato al Cancelletto usa Home Assistant + enabled: false mode: single -- id: "1756127648616" +- id: '1756127648616' alias: Luce Automatica Scala Taverna - description: "" + description: '' use_blueprint: path: homeassistant/motion_light_dual_ng.yaml input: @@ -195,43 +194,43 @@ use_sun: false dont_disturb: false no_motion_wait: 30 -- id: "1757599657040" +- id: '1757599657040' alias: Luce-Giardino - description: "" + description: '' triggers: - - trigger: sun - event: sunset - offset: "1500" - id: giardino-on - - trigger: time - at: "22:00:00" - id: giardino-off + - trigger: sun + event: sunset + offset: '1500' + id: giardino-on + - trigger: time + at: '22:00:00' + id: giardino-off conditions: [] actions: - - if: - - condition: trigger - id: - - giardino-on - then: - - action: light.turn_on - metadata: {} - data: {} - target: - device_id: 52db33441371f13f0f217a2e66668a2c - - if: - - condition: trigger - id: - - giardino-off - then: - - action: light.turn_off - metadata: {} - data: {} - target: - device_id: 52db33441371f13f0f217a2e66668a2c + - if: + - condition: trigger + id: + - giardino-on + then: + - action: light.turn_on + metadata: {} + data: {} + target: + device_id: 52db33441371f13f0f217a2e66668a2c + - if: + - condition: trigger + id: + - giardino-off + then: + - action: light.turn_off + metadata: {} + data: {} + target: + device_id: 52db33441371f13f0f217a2e66668a2c mode: single -- id: "1757871524695" +- id: '1757871524695' alias: EVcharge_process_PRO - description: "" + description: '' use_blueprint: path: homeassistant/evcharge_process_pro.yaml input: @@ -243,75 +242,92 @@ charged_entity1: input_number.evcharge_front_charged charged_entity2: input_number.evcharge_back_charged stop_button: input_button.evcharge_pro_stop -- id: "1758560143754" +- id: '1758560143754' alias: Cancelletto-on - description: "" + description: '' triggers: - - type: turned_on - device_id: 3c1785ee92ef67b2536571f4e318db84 - entity_id: 34480c273e9378e8582a881acd4a7871 - domain: binary_sensor - trigger: device + - type: turned_on + device_id: 3c1785ee92ef67b2536571f4e318db84 + entity_id: 34480c273e9378e8582a881acd4a7871 + domain: binary_sensor + trigger: device conditions: [] actions: - - action: input_boolean.turn_on - metadata: {} - data: {} - target: - entity_id: input_boolean.cancelletto_video_duration + - action: input_boolean.turn_on + metadata: {} + data: {} + target: + entity_id: input_boolean.cancelletto_video_duration mode: single -- id: "1758560334981" +- id: '1758560334981' alias: Cancelletto-off - description: "" + description: '' triggers: - - type: turned_off - device_id: 3c1785ee92ef67b2536571f4e318db84 - entity_id: 34480c273e9378e8582a881acd4a7871 - domain: binary_sensor - trigger: device - for: - hours: 0 - minutes: 0 - seconds: 48 + - type: turned_off + device_id: 3c1785ee92ef67b2536571f4e318db84 + entity_id: 34480c273e9378e8582a881acd4a7871 + domain: binary_sensor + trigger: device + for: + hours: 0 + minutes: 0 + seconds: 48 conditions: [] actions: - - action: input_boolean.turn_off - metadata: {} - data: {} - target: - entity_id: input_boolean.cancelletto_video_duration + - action: input_boolean.turn_off + metadata: {} + data: {} + target: + entity_id: input_boolean.cancelletto_video_duration mode: single -- id: "1759608901579" +- id: '1759608901579' alias: Luce-Manuale-Salotto - description: "" + description: '' triggers: - - trigger: state - entity_id: - - switch.luce_salotto_ctrl - id: luce-salotto-toogle + - trigger: state + entity_id: + - switch.luce_salotto_ctrl + id: luce-salotto-toogle conditions: [] actions: - - action: light.toggle - metadata: {} - data: {} - target: - entity_id: light.luce_salotto + - action: light.toggle + metadata: {} + data: {} + target: + entity_id: light.luce_salotto mode: single -- id: "1763497184744" +- id: '1763497184744' alias: ETcontroller_pub_setFixHPlimit - description: "" + description: '' triggers: - - trigger: state - entity_id: - - input_select.fix_hp_power + - trigger: state + entity_id: + - input_select.fix_hp_power conditions: [] actions: - - action: mqtt.publish - metadata: {} - data_template: - topic: etcontroller/sw/commands - payload: >- - {"cmd": "setFixHPlimit", "params": { - "level": "{{states('input_select.fix_hp_power')}}", - "duration": {{states('input_number.fix_hp_power_duration')}} }} + - action: mqtt.publish + metadata: {} + data_template: + topic: etcontroller/sw/commands + payload: "{\"cmd\": \"setFixHPlimit\", \"params\": {\n \"level\": \"{{states('input_select.fix_hp_power')}}\",\n + \ \"duration\": {{states('input_number.fix_hp_power_duration')}} }}" + mode: single +- id: '1764007463105' + alias: ETcontroller_fix_limit_copy + description: 'This Automation allows to copy status from MQTT read HP Fix Limit + set by ETcontroller.py to internal input_select.fix_hp_power in order to align. + dashboards when fix_hp_limit expires + + ' + triggers: + - trigger: state + entity_id: + - sensor.fix_hp_level_read + conditions: [] + actions: + - action: input_select.select_option + target: + entity_id: input_select.fix_hp_power + data_template: + option: '{{ states(''sensor.fix_hp_level_read'') }}' mode: single diff --git a/blueprints/automation/homeassistant/confort_light.yaml b/blueprints/automation/homeassistant/confort_light.yaml index 8637084..1932d53 100644 --- a/blueprints/automation/homeassistant/confort_light.yaml +++ b/blueprints/automation/homeassistant/confort_light.yaml @@ -21,7 +21,7 @@ triggers: id: p1-confort-light-dim - trigger: sun event: sunset - offset: 00:30:00 + offset: 00:15:00 id: p1-confort-light-on - trigger: state entity_id: diff --git a/configuration.yaml b/configuration.yaml index f504fa1..94d823f 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -3,7 +3,7 @@ default_config: # packages directory homeassistant: - packages: !include_dir_named packages + packages: !include_dir_named packages_dir # Load frontend themes from the themes folder frontend: @@ -21,6 +21,7 @@ light: !include lights.yaml climate: !include climates.yaml binary_sensor: !include binary_sensors.yaml template: !include templates.yaml +mqtt: !include mqtt.yaml # DO NOT remove - Sets MariaDB as database recorder: @@ -47,95 +48,6 @@ logbook: - sensor.date_time_iso - sensor.date_time_utc -# Zigbee Network Map not Working -# mqtt: -# sensor: -# - name: Zigbee2mqtt Networkmap -# # if you change base_topic of Zigbee2mqtt, change state_topic accordingly -# state_topic: zigbee2mqtt/bridge/response/networkmap -# value_template: >- -# {{ now().strftime('%Y-%m-%d %H:%M:%S') }} -# # again, if you change base_topic of Zigbee2mqtt, change json_attributes_topic accordingly -# json_attributes_topic: zigbee2mqtt/bridge/response/networkmap -# json_attributes_template: "{{ value_json.data.value | tojson }}" -mqtt: - - sensor: - - name: HP_power - unit_of_measurement: "W" - unique_id: mon_hp_pw - state_topic: monitoring/hw/heatpump - value_template: >- - {{ value_json.power | int }} - - name: HP_max_power - unit_of_measurement: "W" - unique_id: mon_hp_max_pw - state_topic: monitoring/hw/heatpump - value_template: >- - {{ value_json.hp_max_power | int }} - - name: ACS_temp - unit_of_measurement: "'C" - unique_id: mon_acs_temp - state_topic: monitoring/hw/temperatures - value_template: >- - {{ value_json.acs | int }} - - name: Heating_temp - unit_of_measurement: "'C" - unique_id: mon_heating_temp - state_topic: monitoring/hw/temperatures - value_template: >- - {{ value_json.heating | int }} - - name: Solar_temp - unit_of_measurement: "'C" - unique_id: mon_solar_temp - state_topic: monitoring/hw/temperatures - value_template: >- - {{ value_json.solar | int }} - - name: SE_AC_voltage - unit_of_measurement: "V" - unique_id: mon_se_ac_voltage - state_topic: monitoring/se/values - value_template: >- - {{ (value_json.ac_v | int) / 100 }} - - name: SE_AC_current - unit_of_measurement: "A" - unique_id: mon_se_ac_current - state_topic: monitoring/se/values - value_template: >- - {{ (value_json.ac_i | int) / 100 }} - - name: SE_DC_voltage - unit_of_measurement: "V" - unique_id: mon_se_dc_voltage - state_topic: monitoring/se/values - value_template: >- - {{ (value_json.dc_v | int) / 100 }} - - name: SE_DC_current - unit_of_measurement: "A" - unique_id: mon_se_dc_current - state_topic: monitoring/se/values - value_template: >- - {{ (value_json.dc_i | int) / 100 }} - - name: SE_Heatsink_temp - unit_of_measurement: "'C" - unique_id: mon_se_ht_temperature - state_topic: monitoring/se/values - value_template: >- - {{ (value_json.hs_t | int) / 100 }} - - name: SE_Total_power - unit_of_measurement: "MW" - unique_id: mon_se_tot_p - state_topic: monitoring/se/values - value_template: >- - {{ (value_json.w_tot | int) / 1000000 }} - - name: Zigbee2mqtt Networkmap - unique_id: zigbee2mqtt_bridge_network_map - # if you change base_topic of Zigbee2mqtt, change state_topic accordingly - state_topic: zigbee2mqtt/bridge/response/networkmap - value_template: >- - {{ now().strftime('%Y-%m-%d %H:%M:%S') }} - # again, if you change base_topic of Zigbee2mqtt, change json_attributes_topic accordingly - json_attributes_topic: zigbee2mqtt/bridge/response/networkmap - json_attributes_template: "{{ value_json.data.value | tojson }}" - # add additional cards lovelace: mode: yaml diff --git a/mqtt.yaml b/mqtt.yaml new file mode 100644 index 0000000..5e734fb --- /dev/null +++ b/mqtt.yaml @@ -0,0 +1,82 @@ +--- +- sensor: + - name: HP_power + unit_of_measurement: "W" + unique_id: mon_hp_pw + state_topic: monitoring/hw/heatpump + value_template: >- + {{ value_json.power | int }} + - name: HP_max_power + unit_of_measurement: "W" + unique_id: mon_hp_max_pw + state_topic: monitoring/hw/heatpump + value_template: >- + {{ value_json.hp_max_power | int }} + - name: ACS_temp + unit_of_measurement: "'C" + unique_id: mon_acs_temp + state_topic: monitoring/hw/temperatures + value_template: >- + {{ value_json.acs | int }} + - name: Heating_temp + unit_of_measurement: "'C" + unique_id: mon_heating_temp + state_topic: monitoring/hw/temperatures + value_template: >- + {{ value_json.heating | int }} + - name: Solar_temp + unit_of_measurement: "'C" + unique_id: mon_solar_temp + state_topic: monitoring/hw/temperatures + value_template: >- + {{ value_json.solar | int }} + - name: SE_AC_voltage + unit_of_measurement: "V" + unique_id: mon_se_ac_voltage + state_topic: monitoring/se/values + value_template: >- + {{ (value_json.ac_v | int) / 100 }} + - name: SE_AC_current + unit_of_measurement: "A" + unique_id: mon_se_ac_current + state_topic: monitoring/se/values + value_template: >- + {{ (value_json.ac_i | int) / 100 }} + - name: SE_DC_voltage + unit_of_measurement: "V" + unique_id: mon_se_dc_voltage + state_topic: monitoring/se/values + value_template: >- + {{ (value_json.dc_v | int) / 100 }} + - name: SE_DC_current + unit_of_measurement: "A" + unique_id: mon_se_dc_current + state_topic: monitoring/se/values + value_template: >- + {{ (value_json.dc_i | int) / 100 }} + - name: SE_Heatsink_temp + unit_of_measurement: "'C" + unique_id: mon_se_ht_temperature + state_topic: monitoring/se/values + value_template: >- + {{ (value_json.hs_t | int) / 100 }} + - name: SE_Total_power + unit_of_measurement: "MW" + unique_id: mon_se_tot_p + state_topic: monitoring/se/values + value_template: >- + {{ (value_json.w_tot | int) / 1000000 }} + - name: fix_hp_level_read + unique_id: fix_hp_level_read + state_topic: etcontroller/sw/answers + value_template: >- + {{ value_json['values'].level }} + - name: Zigbee2mqtt Networkmap + unique_id: zigbee2mqtt_bridge_network_map + # if you change base_topic of Zigbee2mqtt, change state_topic accordingly + state_topic: zigbee2mqtt/bridge/response/networkmap + value_template: >- + {{ now().strftime('%Y-%m-%d %H:%M:%S') }} + # again, if you change base_topic of Zigbee2mqtt, change json_attributes_topic accordingly + json_attributes_topic: zigbee2mqtt/bridge/response/networkmap + json_attributes_template: "{{ value_json.data.value | tojson }}"