add first iteration of climate blueprint
This commit is contained in:
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"*.yaml": "jinja-yaml"
|
||||||
|
}
|
||||||
|
}
|
||||||
129
Climate/bosch_bth-ra_control.yaml
Normal file
129
Climate/bosch_bth-ra_control.yaml
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
blueprint:
|
||||||
|
name: Bosch BTH-RA Radiator Control
|
||||||
|
description: >
|
||||||
|
An automation to set Bosch TRV radiator valve to a desired temperature.
|
||||||
|
domain: automation
|
||||||
|
author: Me
|
||||||
|
input:
|
||||||
|
radiator_entity:
|
||||||
|
name: Radiator
|
||||||
|
description: Device needs to be a Bosch BTH-RA Radiator Valve
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
multiple: false
|
||||||
|
filter:
|
||||||
|
- domain: climate
|
||||||
|
window_sensor:
|
||||||
|
name: Window/door sensor (or group)
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
multiple: false
|
||||||
|
filter:
|
||||||
|
- domain: binary_sensor
|
||||||
|
window_delay_open:
|
||||||
|
name: Window/door sensor delay
|
||||||
|
description: Zeit die das Fenster offen bleiben muss, um die den Radiator in den "Fenster offen"-Modus zu versetzen (Default = 30s)
|
||||||
|
default: 30
|
||||||
|
selector:
|
||||||
|
number:
|
||||||
|
mode: box
|
||||||
|
min: 0.0
|
||||||
|
max: 3600.0
|
||||||
|
unit_of_measurement: seconds
|
||||||
|
step: 1.0
|
||||||
|
window_delay_close:
|
||||||
|
name: Window/door sensor delay
|
||||||
|
description: Zeit die das Fenster geschlossen bleiben muss, um die den Radiator in den "Fenster geschlossen"-Modus zu versetzen (Default = 5s)
|
||||||
|
default: 5
|
||||||
|
selector:
|
||||||
|
number:
|
||||||
|
mode: box
|
||||||
|
min: 0.0
|
||||||
|
max: 3600.0
|
||||||
|
unit_of_measurement: seconds
|
||||||
|
step: 1.0
|
||||||
|
temperature_sensor:
|
||||||
|
name: Temperature sensor
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
multiple: false
|
||||||
|
filter:
|
||||||
|
- domain: sensor
|
||||||
|
device_class: temperature
|
||||||
|
|
||||||
|
triggers:
|
||||||
|
- trigger: state
|
||||||
|
entity_id:
|
||||||
|
- binary_sensor.buro_pierre_fenster
|
||||||
|
from: "off"
|
||||||
|
to: "on"
|
||||||
|
for: !input window_delay_open
|
||||||
|
id: FENSTER_OPEN
|
||||||
|
- trigger: state
|
||||||
|
entity_id:
|
||||||
|
- binary_sensor.buro_pierre_fenster
|
||||||
|
from: "on"
|
||||||
|
to: "off"
|
||||||
|
for: !input window_delay_close
|
||||||
|
id: FENSTER_CLOSED
|
||||||
|
- platform: time_pattern
|
||||||
|
minutes: '29'
|
||||||
|
id: SYNC_TEMPERATURE
|
||||||
|
|
||||||
|
variables:
|
||||||
|
trv: !input thermostat
|
||||||
|
remote_temperature_entity: >
|
||||||
|
{% set entities = device_entities(device_id(trv)) %}
|
||||||
|
{% set remote_temperature_entity_id = namespace(id=[]) %}
|
||||||
|
{% for s in entities %}
|
||||||
|
{% if ('remote_temperature' in s) %}
|
||||||
|
{% set remote_temperature_entity_id.id = s %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{{ iif (remote_temperature_entity_id.id[0] is defined, remote_temperature_entity_id.id, '') }}
|
||||||
|
window_detection_entity: >
|
||||||
|
{% set entities = device_entities(device_id(trv)) %}
|
||||||
|
{% set window_detection_entity_id = namespace(id=[]) %}
|
||||||
|
{% for s in entities %}
|
||||||
|
{% if ('window_detection' in s) %}
|
||||||
|
{% set window_detection_entity_id.id = s %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{{ iif (window_detection_entity_id.id[0] is defined, window_detection_entity_id.id, '') }}
|
||||||
|
current_temperature: !input temperature_sensor
|
||||||
|
|
||||||
|
actions:
|
||||||
|
- if:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- FENSTER_OPEN
|
||||||
|
then:
|
||||||
|
- type: turn_on
|
||||||
|
device_id: !input radiator_entity
|
||||||
|
entity_id: !input window_detection_entity
|
||||||
|
domain: switch
|
||||||
|
alias: Setze Fenster auf offen
|
||||||
|
- if:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- FENSTER_CLOSED
|
||||||
|
then:
|
||||||
|
- type: turn_off
|
||||||
|
device_id: !input radiator_entity
|
||||||
|
entity_id: !input window_detection_entity
|
||||||
|
domain: switch
|
||||||
|
alias: Setze Fenster auf geschlossen
|
||||||
|
# temperature sensor sync
|
||||||
|
- if:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- FENSTER_OPEN
|
||||||
|
- FENSTER_CLOSED
|
||||||
|
- SYNC_TEMPERATURE
|
||||||
|
then:
|
||||||
|
- service: number.set_value
|
||||||
|
data:
|
||||||
|
value: "{{ states(current_temperature) | float }}"
|
||||||
|
target:
|
||||||
|
entity_id: "{{ remote_temperature_entity }}"
|
||||||
|
alias: Sync remote temperature sensor
|
||||||
Reference in New Issue
Block a user