From f0c505c332ac6ce3e823f1591f8cdd96edd75144 Mon Sep 17 00:00:00 2001 From: Yurii Date: Tue, 3 Sep 2024 17:38:59 +0300 Subject: [PATCH] chore: added blueprints --- assets/ha/dhw_meter.yaml | 3 ++ ...tdoor_temp_to_controller_from_weather.yaml | 29 ----------- assets/ha/report_temp_to_controller.yaml | 30 ------------ assets/ha/report_temp_to_otgateway.yaml | 48 +++++++++++++++++++ ...report_temp_to_otgateway_from_weather.yaml | 47 ++++++++++++++++++ 5 files changed, 98 insertions(+), 59 deletions(-) delete mode 100644 assets/ha/report_outdoor_temp_to_controller_from_weather.yaml delete mode 100644 assets/ha/report_temp_to_controller.yaml create mode 100644 assets/ha/report_temp_to_otgateway.yaml create mode 100644 assets/ha/report_temp_to_otgateway_from_weather.yaml diff --git a/assets/ha/dhw_meter.yaml b/assets/ha/dhw_meter.yaml index a64d030..cdc2828 100644 --- a/assets/ha/dhw_meter.yaml +++ b/assets/ha/dhw_meter.yaml @@ -1,3 +1,6 @@ +# Package for Home Assistant Packages +# More info: https://www.home-assistant.io/docs/configuration/packages/ + dhw_meter: sensor: - platform: integration diff --git a/assets/ha/report_outdoor_temp_to_controller_from_weather.yaml b/assets/ha/report_outdoor_temp_to_controller_from_weather.yaml deleted file mode 100644 index 4b58c51..0000000 --- a/assets/ha/report_outdoor_temp_to_controller_from_weather.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Script for reporting outdoor temperature to the controller from home assistant weather integration -# Updated: 07.12.2023 - -alias: Report outdoor temp to controller from weather -description: "" -variables: - # The source weather from which we take the temperature - source_entity: "weather.home" - - # Target entity number where we set the temperature - # If the prefix has not changed, then you do not need to change it - target_entity: "number.opentherm_outdoor_temp" -trigger: - - platform: time_pattern - seconds: /30 -condition: - - condition: template - value_template: "{{ states(source_entity) != 'unavailable' and states(target_entity) != 'unavailable' }}" -action: - - if: - - condition: template - value_template: "{{ (state_attr(source_entity, 'temperature')|float(0) - states(target_entity)|float(0)) | abs | round(2) >= 0.1 }}" - then: - - service: number.set_value - data: - value: "{{ state_attr(source_entity, 'temperature')|float(0)|round(2) }}" - target: - entity_id: "{{ target_entity }}" -mode: single \ No newline at end of file diff --git a/assets/ha/report_temp_to_controller.yaml b/assets/ha/report_temp_to_controller.yaml deleted file mode 100644 index 902d3a8..0000000 --- a/assets/ha/report_temp_to_controller.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Script for reporting indoor/outdoor temperature to the controller from any home assistant sensor -# Updated: 07.12.2023 - -alias: Report temp to controller -description: "" -variables: - # The source sensor from which we take the temperature - source_entity: "sensor.livingroom_temperature" - - # Target entity number where we set the temperature - # To report indoor temperature: number.opentherm_indoor_temp - # To report outdoor temperature: number.opentherm_outdoor_temp - target_entity: "number.opentherm_indoor_temp" -trigger: - - platform: time_pattern - seconds: /30 -condition: - - condition: template - value_template: "{{ states(source_entity) != 'unavailable' and states(target_entity) != 'unavailable' }}" -action: - - if: - - condition: template - value_template: "{{ (states(source_entity)|float(0) - states(target_entity)|float(0)) | abs | round(2) >= 0.01 }}" - then: - - service: number.set_value - data: - value: "{{ states(source_entity)|float(0)|round(2) }}" - target: - entity_id: "{{ target_entity }}" -mode: single \ No newline at end of file diff --git a/assets/ha/report_temp_to_otgateway.yaml b/assets/ha/report_temp_to_otgateway.yaml new file mode 100644 index 0000000..abf56e9 --- /dev/null +++ b/assets/ha/report_temp_to_otgateway.yaml @@ -0,0 +1,48 @@ +# Blueprint for reporting indoor/outdoor temperature to OpenTherm Gateway from any home assistant sensor +# Updated: 03.09.2024 + +blueprint: + name: Report temp to OpenTherm Gateway + domain: automation + author: "Laxilef" + + input: + source_entity: + name: Source entity + description: "Temperature data source" + selector: + entity: + multiple: false + filter: + - domain: sensor + device_class: temperature + target_entity: + name: Target entity + description: "Usually ``number.opentherm_indoor_temp`` or ``number.opentherm_outdoor_temp``" + default: "number.opentherm_indoor_temp" + selector: + entity: + multiple: false + filter: + - domain: number + +mode: single +variables: + source_entity: !input source_entity + target_entity: !input target_entity +trigger: + - platform: time_pattern + seconds: /30 +condition: + - condition: template + value_template: "{{ states(source_entity) != 'unavailable' and states(target_entity) != 'unavailable' }}" +action: + - if: + - condition: template + value_template: "{{ (states(source_entity)|float(0) - states(target_entity)|float(0)) | abs | round(2) >= 0.01 }}" + then: + - service: number.set_value + data: + value: "{{ states(source_entity)|float(0)|round(2) }}" + target: + entity_id: "{{ target_entity }}" \ No newline at end of file diff --git a/assets/ha/report_temp_to_otgateway_from_weather.yaml b/assets/ha/report_temp_to_otgateway_from_weather.yaml new file mode 100644 index 0000000..1ad38c0 --- /dev/null +++ b/assets/ha/report_temp_to_otgateway_from_weather.yaml @@ -0,0 +1,47 @@ +# Blueprint for reporting temperature to OpenTherm Gateway from home assistant weather integration +# Updated: 03.09.2024 + +blueprint: + name: Report temp to OpenTherm Gateway from Weather + domain: automation + author: "Laxilef" + + input: + source_entity: + name: Source entity + description: "Temperature data source" + selector: + entity: + multiple: false + filter: + - domain: weather + target_entity: + name: Target entity + description: "Usually ``number.opentherm_outdoor_temp``" + default: "number.opentherm_outdoor_temp" + selector: + entity: + multiple: false + filter: + - domain: number + +mode: single +variables: + source_entity: !input source_entity + target_entity: !input target_entity +trigger: + - platform: time_pattern + seconds: /30 +condition: + - condition: template + value_template: "{{ states(source_entity) != 'unavailable' and states(target_entity) != 'unavailable' }}" +action: + - if: + - condition: template + value_template: "{{ (state_attr(source_entity, 'temperature')|float(0) - states(target_entity)|float(0)) | abs | round(2) >= 0.1 }}" + then: + - service: number.set_value + data: + value: "{{ state_attr(source_entity, 'temperature')|float(0)|round(2) }}" + target: + entity_id: "{{ target_entity }}" \ No newline at end of file