mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 02:34:29 +05:00
ha scripts
This commit is contained in:
16
assets/ha/dhw_meter.yaml
Normal file
16
assets/ha/dhw_meter.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
dhw_meter:
|
||||
sensor:
|
||||
- platform: integration
|
||||
unique_id: hot_water_meter
|
||||
name: hot_water_meter
|
||||
source: sensor.opentherm_dhw_flow_rate
|
||||
unit_time: min
|
||||
method: left
|
||||
round: 2
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
sensor.hot_water_meter:
|
||||
friendly_name: "Hot water"
|
||||
device_class: "water"
|
||||
icon: "mdi:water-pump"
|
||||
22
assets/ha/set_boiler_indoor_temp.yaml
Normal file
22
assets/ha/set_boiler_indoor_temp.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
alias: Set boiler indoor temp
|
||||
description: ""
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- sensor.livingroom_temperature
|
||||
- platform: time_pattern
|
||||
seconds: /30
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: "{{ states('sensor.livingroom_temperature') not in ['unavailable', '0'] }}"
|
||||
action:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ has_value('number.opentherm_indoor_temp') and (states('sensor.livingroom_temperature')|float(0) - states('number.opentherm_indoor_temp')|float(0)) | abs | round(2) >= 0.01 }}"
|
||||
then:
|
||||
- service: number.set_value
|
||||
data:
|
||||
value: "{{ states('sensor.livingroom_temperature')|float(0)|round(2) }}"
|
||||
target:
|
||||
entity_id: number.opentherm_indoor_temp
|
||||
mode: single
|
||||
25
assets/ha/set_boiler_outdoor_temp.yaml
Normal file
25
assets/ha/set_boiler_outdoor_temp.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
alias: Set boiler outdoor temp
|
||||
description: ""
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- weather.home
|
||||
attribute: temperature
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 1
|
||||
seconds: 0
|
||||
- platform: time_pattern
|
||||
seconds: /30
|
||||
condition: []
|
||||
action:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ has_value('weather.home') and (state_attr('weather.home', 'temperature')|float(0) - states('number.opentherm_outdoor_temp')|float(0)) | abs | round(2) >= 0.1 }}"
|
||||
then:
|
||||
- service: number.set_value
|
||||
data:
|
||||
value: "{{ state_attr('weather.home', 'temperature')|float(0)|round(2) }}"
|
||||
target:
|
||||
entity_id: number.opentherm_outdoor_temp
|
||||
mode: single
|
||||
Reference in New Issue
Block a user