move dev to prod script
This commit is contained in:
@@ -1,12 +1,14 @@
|
|||||||
mode: single
|
mode: single
|
||||||
blueprint:
|
blueprint:
|
||||||
name: Bosch BTH-RA Radiator Control
|
name: Bosch BTH-RA Radiator Control - DEV
|
||||||
|
homeassistant:
|
||||||
|
min_version: "2024.6.0"
|
||||||
description: >
|
description: >
|
||||||
An automation to set Bosch TRV radiator valve to a desired temperature.
|
Eine Automation zur automatischen Steuerung eines Bosch TRV Heizkörperthermostats.
|
||||||
domain: automation
|
domain: automation
|
||||||
author: Me
|
author: Me
|
||||||
input:
|
input:
|
||||||
radiator_entity:
|
trv:
|
||||||
name: Thermostat
|
name: Thermostat
|
||||||
description: Thermostat muss ein Bosch BTH-RA sein
|
description: Thermostat muss ein Bosch BTH-RA sein
|
||||||
selector:
|
selector:
|
||||||
@@ -14,6 +16,11 @@ blueprint:
|
|||||||
multiple: false
|
multiple: false
|
||||||
filter:
|
filter:
|
||||||
- domain: climate
|
- domain: climate
|
||||||
|
window_section:
|
||||||
|
name: Fenster-/Türsensor Konfiguration
|
||||||
|
description: Konfiguration für den Fenster-/Türsensor.
|
||||||
|
collapsed: false
|
||||||
|
input:
|
||||||
window_sensor:
|
window_sensor:
|
||||||
name: Fenster-/Türsensor (oder Gruppe)
|
name: Fenster-/Türsensor (oder Gruppe)
|
||||||
selector:
|
selector:
|
||||||
@@ -43,6 +50,11 @@ blueprint:
|
|||||||
max: 3600.0
|
max: 3600.0
|
||||||
unit_of_measurement: seconds
|
unit_of_measurement: seconds
|
||||||
step: 1.0
|
step: 1.0
|
||||||
|
remaining_section:
|
||||||
|
name: Weitere Konfiguration
|
||||||
|
description: Sonstige Konfigurationen für die Automation
|
||||||
|
collapsed: false
|
||||||
|
input:
|
||||||
temperature_sensor:
|
temperature_sensor:
|
||||||
name: Temperatursensor
|
name: Temperatursensor
|
||||||
selector:
|
selector:
|
||||||
@@ -51,6 +63,54 @@ blueprint:
|
|||||||
filter:
|
filter:
|
||||||
- domain: sensor
|
- domain: sensor
|
||||||
device_class: temperature
|
device_class: temperature
|
||||||
|
radiator_schedules:
|
||||||
|
name: Heizpläne
|
||||||
|
description: Alle Heizpläne die für den Radiator berücksichtigt werden sollen. Sind mehrere Schedules aktiv, wird der erste mit einem gültigen Slot verwendet.
|
||||||
|
default: []
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
multiple: true
|
||||||
|
filter:
|
||||||
|
- domain: switch
|
||||||
|
|
||||||
|
variables:
|
||||||
|
trv: !input trv
|
||||||
|
radiator_schedules: !input radiator_schedules
|
||||||
|
temperature_sensor: !input temperature_sensor
|
||||||
|
remote_temperature_entity: >
|
||||||
|
{% set entities = device_entities(device_id(trv)) %}
|
||||||
|
{% set remote_temperature_entity_id = namespace(id='') %}
|
||||||
|
{% for entity in entities %}
|
||||||
|
{% if 'remote_temperature' in entity %}
|
||||||
|
{% set remote_temperature_entity_id.id = entity %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{{ remote_temperature_entity_id.id }}
|
||||||
|
window_detection_entity: >
|
||||||
|
{% set entities = device_entities(device_id(trv)) %}
|
||||||
|
{% set window_detection_entity_id = namespace(id='') %}
|
||||||
|
{% for entity in entities %}
|
||||||
|
{% if 'window_detection' in entity %}
|
||||||
|
{% set window_detection_entity_id.id = entity %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{{ window_detection_entity_id.id }}
|
||||||
|
scheduled_temperature: >
|
||||||
|
{% set ns = namespace(current_temperature = none) %}
|
||||||
|
{% for schedule in radiator_schedules %}
|
||||||
|
{% if states(schedule) == 'on' and state_attr(schedule, 'current_slot') is not none %}
|
||||||
|
{% set current_slot = state_attr(schedule, 'current_slot') %}
|
||||||
|
{% set actions = state_attr(schedule, 'actions') %}
|
||||||
|
{% if actions is not none and actions | length > current_slot %}
|
||||||
|
{% set action = actions[current_slot] %}
|
||||||
|
{% if action.data.temperature is defined %}
|
||||||
|
{% set ns.current_temperature = action.data.temperature %}
|
||||||
|
{% break %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{{ ns.current_temperature }}
|
||||||
|
|
||||||
triggers:
|
triggers:
|
||||||
- trigger: state
|
- trigger: state
|
||||||
@@ -75,60 +135,53 @@ triggers:
|
|||||||
entity_id: !input temperature_sensor
|
entity_id: !input temperature_sensor
|
||||||
id: TEMP_CHANGED
|
id: TEMP_CHANGED
|
||||||
|
|
||||||
variables:
|
|
||||||
trv: !input radiator_entity
|
|
||||||
remote_temperature_entity: >
|
|
||||||
{% set entities = device_entities(device_id(trv)) %}
|
|
||||||
{% set remote_temperature_entity_id = namespace(id='') %}
|
|
||||||
{% for entity in entities %}
|
|
||||||
{% if 'remote_temperature' in entity %}
|
|
||||||
{% set remote_temperature_entity_id.id = entity %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{{ remote_temperature_entity_id.id }}
|
|
||||||
window_detection_entity: >
|
|
||||||
{% set entities = device_entities(device_id(trv)) %}
|
|
||||||
{% set window_detection_entity_id = namespace(id='') %}
|
|
||||||
{% for entity in entities %}
|
|
||||||
{% if 'window_detection' in entity %}
|
|
||||||
{% set window_detection_entity_id.id = entity %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{{ window_detection_entity_id.id }}
|
|
||||||
current_temperature: !input temperature_sensor
|
|
||||||
|
|
||||||
actions:
|
actions:
|
||||||
- if:
|
- choose:
|
||||||
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id:
|
id:
|
||||||
- FENSTER_OPEN
|
- FENSTER_OPEN
|
||||||
then:
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{{ is_state(window_detection_entity, 'off') }}
|
||||||
|
sequence:
|
||||||
- service: switch.turn_on
|
- service: switch.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: "{{ window_detection_entity }}"
|
entity_id: "{{ window_detection_entity }}"
|
||||||
alias: Setze Fenster auf offen
|
alias: Setze Fenster auf offen
|
||||||
- if:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id:
|
id:
|
||||||
- FENSTER_CLOSED
|
- FENSTER_CLOSED
|
||||||
then:
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{{ is_state(window_detection_entity, 'on') }}
|
||||||
|
sequence:
|
||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: "{{ window_detection_entity }}"
|
entity_id: "{{ window_detection_entity }}"
|
||||||
alias: Setze Fenster auf geschlossen
|
|
||||||
# temperature sensor sync
|
|
||||||
- if:
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{{ scheduled_temperature is not none }}
|
||||||
|
then:
|
||||||
|
- action: climate.set_temperature
|
||||||
|
target:
|
||||||
|
entity_id: !input trv
|
||||||
|
data:
|
||||||
|
temperature: "{{ scheduled_temperature | float }}"
|
||||||
|
alias: Setze Fenster auf geschlossen und setze Solltemperatur auf Wert aus Zeitplan (wenn vorhanden)
|
||||||
|
# temperature sensor sync
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id:
|
id:
|
||||||
- FENSTER_OPEN
|
|
||||||
- FENSTER_CLOSED
|
|
||||||
- SYNC_TEMPERATURE
|
- SYNC_TEMPERATURE
|
||||||
- TEMP_CHANGED
|
- TEMP_CHANGED
|
||||||
then:
|
sequence:
|
||||||
- service: number.set_value
|
- service: number.set_value
|
||||||
data:
|
data:
|
||||||
value: "{{ states(current_temperature) | float }}"
|
value: "{{ states(temperature_sensor) | float }}"
|
||||||
target:
|
target:
|
||||||
entity_id: "{{ remote_temperature_entity }}"
|
entity_id: "{{ remote_temperature_entity }}"
|
||||||
alias: Sync remote temperature sensor
|
alias: Synchronisiere Temperatur am TRV
|
||||||
alias: Synce Temperatur zum TRV
|
|
||||||
Reference in New Issue
Block a user