2133 lines
88 KiB
YAML
2133 lines
88 KiB
YAML
- alias: AC Steuerung
|
|
description: ''
|
|
triggers:
|
|
- entity_id:
|
|
- schedule.ac_schedule_heizen
|
|
id: schedule_heizen
|
|
trigger: state
|
|
- entity_id:
|
|
- schedule.ac_schedule_kuhlen
|
|
id: schedule_kühlen
|
|
trigger: state
|
|
- id: einstellungen
|
|
entity_id:
|
|
- input_boolean.ac_schedule_verwenden
|
|
- binary_sensor.ac_heizbetrieb_automatisch
|
|
- input_boolean.ac_heizbetrieb_manuell
|
|
- input_number.ac_heizen_schwelltemperatur
|
|
- input_select.ac_smart_modus
|
|
- input_boolean.ac_smart_steuerung_ohne_zeitplan
|
|
- input_boolean.ac_pause_aktiv
|
|
trigger: state
|
|
- id: smart_modus_pv
|
|
entity_id:
|
|
- input_boolean.ac_pv_mit_batterie
|
|
- sensor.powerocean_bpsoc
|
|
- binary_sensor.ac_pv_einschalten_erlaubt
|
|
- binary_sensor.ac_pv_ausschalten_erforderlich
|
|
- input_number.ac_pv_batterie_schwellwert
|
|
trigger: state
|
|
- id: smart_modus_temp
|
|
entity_id:
|
|
- input_number.ac_wohlfuhltemperatur_kuhlen
|
|
- input_number.ac_wohlfuhltemperatur_heizen
|
|
- sensor.wetter_aussentemperatur
|
|
- input_number.ac_temp_puffer_ein
|
|
- input_number.ac_temp_puffer_aus
|
|
trigger: state
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.ac_vorkuhlung_schlafzimmer_aktiv
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_pause_aktiv
|
|
state: 'off'
|
|
- condition: template
|
|
value_template: "{% if trigger.id == 'smart_modus_pv' %}\n {{ states('input_select.ac_smart_modus')\
|
|
\ == 'PV-Abhängig' }}\n{% elif trigger.id == 'smart_modus_temp' %}\n {{ states('input_select.ac_smart_modus')\
|
|
\ == 'Temperatur-Abhängig' }}\n{% else %}\n true\n{% endif %}\n"
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_heizbetrieb_automatisch
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_heizbetrieb_manuell
|
|
state: 'off'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ states('input_boolean.ac_schedule_verwenden') == 'on'\
|
|
\ or\n is_state('input_boolean.ac_smart_steuerung_ohne_zeitplan',\
|
|
\ 'on') }}"
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_ausschalten_erforderlich'', ''on'')
|
|
}}'
|
|
- condition: template
|
|
value_template: "{{ states('input_select.ac_smart_modus') == 'Temperatur-Abhängig'\
|
|
\ and\n (states('sensor.wetter_aussentemperatur') | float(99) <=\
|
|
\ states('input_number.ac_wohlfuhltemperatur_kuhlen') | float(0) -\
|
|
\ states('input_number.ac_temp_puffer_aus') | float(0)) }}"
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- event: ac_pv_block
|
|
event_data:
|
|
mode: kuhlen
|
|
- target:
|
|
entity_id:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
action: climate.turn_off
|
|
data: {}
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Temperatur-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(''climate.ac_hobbyraum'', ''climate.ac_abstellraum'',
|
|
''climate.ac_kuche'', ''climate.ac_schlafzimmer'', ''climate.ac_wohnzimmer'')
|
|
| selectattr(''state'', ''!='', ''off'') | list | count > 0
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated_temp'' }}'
|
|
then:
|
|
- data:
|
|
message_title: Klimaanlage
|
|
message_text: Anlage deaktiviert. Außentemperatur ({{ states('sensor.wetter_aussentemperatur')
|
|
| round(1) }}°C) ist kühl genug.
|
|
notification_data:
|
|
tag: ac_system_status
|
|
action: script.notification_mobile_phones
|
|
- target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated_temp
|
|
action: input_text.set_value
|
|
- target:
|
|
entity_id:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
action: climate.turn_off
|
|
data: {}
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'')
|
|
== ''on'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''schedule.ac_schedule_kuhlen'') == ''on''
|
|
}}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Keine''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_einschalten_erlaubt'', ''on'')
|
|
}}'
|
|
- condition: template
|
|
value_template: "{{ states('input_select.ac_smart_modus') == 'Temperatur-Abhängig'\
|
|
\ and\n (states('sensor.wetter_aussentemperatur') | float(0)\
|
|
\ >= states('input_number.ac_wohlfuhltemperatur_kuhlen') | float(0)\
|
|
\ + states('input_number.ac_temp_puffer_ein') | float(0)) }}"
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''PV-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ is_state(''binary_sensor.ac_pv_einschalten_erlaubt'',
|
|
''on'') }}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''Temperatur-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(0) >= states(''input_number.ac_wohlfuhltemperatur_kuhlen'')
|
|
| float(0) + states(''input_number.ac_temp_puffer_ein'') | float(0)
|
|
}}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(''climate.ac_hobbyraum'', ''climate.ac_abstellraum'',
|
|
''climate.ac_kuche'', ''climate.ac_schlafzimmer'', ''climate.ac_wohnzimmer'')
|
|
| selectattr(''state'', ''=='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''activated_cool'' }}'
|
|
then:
|
|
- data:
|
|
message_title: Klimaanlage
|
|
message_text: Wird aktiviert (Kühlbetrieb)
|
|
notification_data:
|
|
tag: ac_system_status
|
|
action: script.notification_mobile_phones
|
|
- target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: activated_cool
|
|
action: input_text.set_value
|
|
- target:
|
|
entity_id:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
data:
|
|
hvac_mode: cool
|
|
action: climate.set_hvac_mode
|
|
- target:
|
|
entity_id:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
data:
|
|
temperature: '{{ states(''input_number.ac_wohlfuhltemperatur_kuhlen'')
|
|
| float(24) }}'
|
|
action: climate.set_temperature
|
|
default:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(''climate.ac_hobbyraum'', ''climate.ac_abstellraum'',
|
|
''climate.ac_kuche'', ''climate.ac_schlafzimmer'', ''climate.ac_wohnzimmer'')
|
|
| selectattr(''state'', ''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated'' }}'
|
|
then:
|
|
- data:
|
|
message_title: Klimaanlage
|
|
message_text: Wird deaktiviert (Zeitplan Ende).
|
|
notification_data:
|
|
tag: ac_system_status
|
|
action: script.notification_mobile_phones
|
|
- target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated
|
|
action: input_text.set_value
|
|
- target:
|
|
entity_id:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
action: climate.turn_off
|
|
data: {}
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_heizbetrieb_automatisch
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_heizbetrieb_manuell
|
|
state: 'on'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: "{{ states('input_boolean.ac_schedule_verwenden') == 'on'\
|
|
\ or\n is_state('input_boolean.ac_smart_steuerung_ohne_zeitplan',\
|
|
\ 'on') }}"
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_ausschalten_erforderlich'', ''on'')
|
|
}}'
|
|
- condition: template
|
|
value_template: "{{ states('input_select.ac_smart_modus') == 'Temperatur-Abhängig'\
|
|
\ and\n (states('sensor.wetter_aussentemperatur') | float(-99) >=\
|
|
\ states('input_number.ac_wohlfuhltemperatur_heizen') | float(0) +\
|
|
\ states('input_number.ac_temp_puffer_aus') | float(0)) }}"
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- event: ac_pv_block
|
|
event_data:
|
|
mode: heizen
|
|
- target:
|
|
entity_id:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
action: climate.turn_off
|
|
data: {}
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Temperatur-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(''climate.ac_hobbyraum'', ''climate.ac_abstellraum'',
|
|
''climate.ac_kuche'', ''climate.ac_schlafzimmer'', ''climate.ac_wohnzimmer'')
|
|
| selectattr(''state'', ''!='', ''off'') | list | count > 0
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated_temp'' }}'
|
|
then:
|
|
- data:
|
|
message_title: Klimaanlage
|
|
message_text: Anlage deaktiviert. Außentemperatur ({{ states('sensor.wetter_aussentemperatur')
|
|
| round(1) }}°C) ist warm genug.
|
|
notification_data:
|
|
tag: ac_system_status
|
|
action: script.notification_mobile_phones
|
|
- target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated_temp
|
|
action: input_text.set_value
|
|
- target:
|
|
entity_id:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
action: climate.turn_off
|
|
data: {}
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'')
|
|
== ''on'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''schedule.ac_schedule_heizen'') == ''on''
|
|
}}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Keine''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_einschalten_erlaubt'', ''on'')
|
|
}}'
|
|
- condition: template
|
|
value_template: "{{ states('input_select.ac_smart_modus') == 'Temperatur-Abhängig'\
|
|
\ and\n (states('sensor.wetter_aussentemperatur') | float(99)\
|
|
\ <= states('input_number.ac_wohlfuhltemperatur_heizen') | float(0)\
|
|
\ - states('input_number.ac_temp_puffer_ein') | float(0)) }}"
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''PV-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ is_state(''binary_sensor.ac_pv_einschalten_erlaubt'',
|
|
''on'') }}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''Temperatur-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(99) <= states(''input_number.ac_wohlfuhltemperatur_heizen'')
|
|
| float(0) - states(''input_number.ac_temp_puffer_ein'') | float(0)
|
|
}}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(''climate.ac_hobbyraum'', ''climate.ac_abstellraum'',
|
|
''climate.ac_kuche'', ''climate.ac_schlafzimmer'', ''climate.ac_wohnzimmer'')
|
|
| selectattr(''state'', ''=='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''activated_heat'' }}'
|
|
then:
|
|
- data:
|
|
message_title: Klimaanlage
|
|
message_text: Wird aktiviert (Heizbetrieb)
|
|
notification_data:
|
|
tag: ac_system_status
|
|
action: script.notification_mobile_phones
|
|
- target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: activated_heat
|
|
action: input_text.set_value
|
|
- target:
|
|
entity_id:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
data:
|
|
hvac_mode: heat
|
|
action: climate.set_hvac_mode
|
|
- target:
|
|
entity_id:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
data:
|
|
temperature: '{{ states(''input_number.ac_wohlfuhltemperatur_heizen'')
|
|
| float(21) }}'
|
|
action: climate.set_temperature
|
|
default:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(''climate.ac_hobbyraum'', ''climate.ac_abstellraum'',
|
|
''climate.ac_kuche'', ''climate.ac_schlafzimmer'', ''climate.ac_wohnzimmer'')
|
|
| selectattr(''state'', ''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated'' }}'
|
|
then:
|
|
- data:
|
|
message_title: Klimaanlage
|
|
message_text: Wird deaktiviert (Zeitplan Ende).
|
|
notification_data:
|
|
tag: ac_system_status
|
|
action: script.notification_mobile_phones
|
|
- target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated
|
|
action: input_text.set_value
|
|
- target:
|
|
entity_id:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
action: climate.turn_off
|
|
data: {}
|
|
mode: single
|
|
- alias: AC Steuerung
|
|
description: ''
|
|
triggers:
|
|
- platform: state
|
|
entity_id:
|
|
- schedule.ac_schedule_heizen
|
|
id: schedule_heizen
|
|
- platform: state
|
|
entity_id:
|
|
- schedule.ac_schedule_kuhlen
|
|
id: schedule_kühlen
|
|
- platform: state
|
|
id: einstellungen
|
|
entity_id:
|
|
- input_boolean.ac_schedule_verwenden
|
|
- binary_sensor.ac_heizbetrieb_automatisch
|
|
- input_boolean.ac_heizbetrieb_manuell
|
|
- input_number.ac_heizen_schwelltemperatur
|
|
- input_select.ac_smart_modus
|
|
- input_boolean.ac_smart_steuerung_ohne_zeitplan
|
|
- input_boolean.ac_pause_aktiv
|
|
- platform: state
|
|
id: smart_modus_pv
|
|
entity_id:
|
|
- input_boolean.ac_pv_mit_batterie
|
|
- sensor.powerocean_bpsoc
|
|
- binary_sensor.ac_pv_einschalten_erlaubt
|
|
- binary_sensor.ac_pv_ausschalten_erforderlich
|
|
- input_number.ac_pv_batterie_schwellwert
|
|
- platform: state
|
|
id: smart_modus_temp
|
|
entity_id:
|
|
- input_number.ac_wohlfuhltemperatur_kuhlen
|
|
- input_number.ac_wohlfuhltemperatur_heizen
|
|
- sensor.wetter_aussentemperatur
|
|
- input_number.ac_temp_puffer_ein
|
|
- input_number.ac_temp_puffer_aus
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.ac_vorkuhlung_schlafzimmer_aktiv
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_pause_aktiv
|
|
state: 'off'
|
|
- condition: template
|
|
value_template: "{% if trigger.id == 'smart_modus_pv' %}\n {{ states('input_select.ac_smart_modus')\
|
|
\ == 'PV-Abhängig' }}\n{% elif trigger.id == 'smart_modus_temp' %}\n {{ states('input_select.ac_smart_modus')\
|
|
\ == 'Temperatur-Abhängig' }}\n{% else %}\n true\n{% endif %}\n"
|
|
actions:
|
|
- variables:
|
|
all_climates:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
manual_map:
|
|
climate.ac_hobbyraum: input_boolean.ac_manuell_hobbyraum
|
|
climate.ac_abstellraum: input_boolean.ac_manuell_abstellraum
|
|
climate.ac_kuche: input_boolean.ac_manuell_kuche
|
|
climate.ac_schlafzimmer: input_boolean.ac_manuell_schlafzimmer
|
|
climate.ac_wohnzimmer: input_boolean.ac_manuell_wohnzimmer
|
|
climate_targets: "{% set devices_to_control = [] %} {% for climate_entity in\
|
|
\ all_climates %}\n {% set manual_switch = manual_map[climate_entity] %}\n\
|
|
\ {% if is_state(manual_switch, 'off') %}\n {% set _ = devices_to_control.append(climate_entity)\
|
|
\ %}\n {% endif %}\n{% endfor %} {{ devices_to_control }}\n"
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_heizbetrieb_automatisch
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_heizbetrieb_manuell
|
|
state: 'off'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'') ==
|
|
''on'' or is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_ausschalten_erforderlich'', ''on'')
|
|
}}'
|
|
- condition: template
|
|
value_template: "{{ states('input_select.ac_smart_modus') == 'Temperatur-Abhängig'\
|
|
\ and\n (states('sensor.wetter_aussentemperatur') | float(99) <=\
|
|
\ states('input_number.ac_wohlfuhltemperatur_kuhlen') | float(0) -\
|
|
\ states('input_number.ac_temp_puffer_aus') | float(0)) }}"
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- event: ac_pv_block
|
|
event_data:
|
|
mode: kuhlen
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Temperatur-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated_temp'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Anlage deaktiviert. Außentemperatur ({{ states('sensor.wetter_aussentemperatur')
|
|
| round(1) }}°C) ist kühl genug.
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated_temp
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'')
|
|
== ''on'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''schedule.ac_schedule_kuhlen'') == ''on''
|
|
}}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Keine''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_einschalten_erlaubt'', ''on'')
|
|
}}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''Temperatur-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(0) >= states(''input_number.ac_wohlfuhltemperatur_kuhlen'')
|
|
| float(0) + states(''input_number.ac_temp_puffer_ein'') | float(0)
|
|
}}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
}}'
|
|
- '{{ is_state(''binary_sensor.ac_pv_einschalten_erlaubt'', ''on'')
|
|
}}'
|
|
- condition: and
|
|
conditions:
|
|
- '{{ states(''input_select.ac_smart_modus'') == ''Temperatur-Abhängig''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(0) >= states(''input_number.ac_wohlfuhltemperatur_kuhlen'')
|
|
| float(0) + states(''input_number.ac_temp_puffer_ein'') | float(0)
|
|
}}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''=='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''activated_cool'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Wird aktiviert (Kühlbetrieb)
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: activated_cool
|
|
- service: climate.set_hvac_mode
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
hvac_mode: cool
|
|
- service: climate.set_temperature
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
temperature: '{{ states(''input_number.ac_wohlfuhltemperatur_kuhlen'')
|
|
| float(24) }}'
|
|
default:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Wird deaktiviert (Zeitplan Ende).
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_heizbetrieb_automatisch
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_heizbetrieb_manuell
|
|
state: 'on'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'') ==
|
|
''on'' or is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_ausschalten_erforderlich'', ''on'')
|
|
}}'
|
|
- condition: template
|
|
value_template: "{{ states('input_select.ac_smart_modus') == 'Temperatur-Abhängig'\
|
|
\ and\n (states('sensor.wetter_aussentemperatur') | float(-99) >=\
|
|
\ states('input_number.ac_wohlfuhltemperatur_heizen') | float(0) +\
|
|
\ states('input_number.ac_temp_puffer_aus') | float(0)) }}"
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- event: ac_pv_block
|
|
event_data:
|
|
mode: heizen
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Temperatur-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated_temp'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Anlage deaktiviert. Außentemperatur ({{ states('sensor.wetter_aussentemperatur')
|
|
| round(1) }}°C) ist warm genug.
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated_temp
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'')
|
|
== ''on'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''schedule.ac_schedule_heizen'') == ''on''
|
|
}}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Keine''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_einschalten_erlaubt'', ''on'')
|
|
}}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''Temperatur-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(99) <= states(''input_number.ac_wohlfuhltemperatur_heizen'')
|
|
| float(0) - states(''input_number.ac_temp_puffer_ein'') | float(0)
|
|
}}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
}}'
|
|
- '{{ is_state(''binary_sensor.ac_pv_einschalten_erlaubt'', ''on'')
|
|
}}'
|
|
- condition: and
|
|
conditions:
|
|
- '{{ states(''input_select.ac_smart_modus'') == ''Temperatur-Abhängig''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(99) <= states(''input_number.ac_wohlfuhltemperatur_heizen'')
|
|
| float(0) - states(''input_number.ac_temp_puffer_ein'') | float(0)
|
|
}}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''=='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''activated_heat'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Wird aktiviert (Heizbetrieb)
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: activated_heat
|
|
- service: climate.set_hvac_mode
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
hvac_mode: heat
|
|
- service: climate.set_temperature
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
temperature: '{{ states(''input_number.ac_wohlfuhltemperatur_heizen'')
|
|
| float(21) }}'
|
|
default:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Wird deaktiviert (Zeitplan Ende).
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
mode: single
|
|
- alias: AC Steuerung
|
|
description: ''
|
|
triggers:
|
|
- entity_id:
|
|
- schedule.ac_schedule_heizen
|
|
id: schedule_heizen
|
|
trigger: state
|
|
- entity_id:
|
|
- schedule.ac_schedule_kuhlen
|
|
id: schedule_kühlen
|
|
trigger: state
|
|
- id: einstellungen
|
|
entity_id:
|
|
- input_boolean.ac_schedule_verwenden
|
|
- binary_sensor.ac_heizbetrieb_automatisch
|
|
- input_boolean.ac_heizbetrieb_manuell
|
|
- input_number.ac_heizen_schwelltemperatur
|
|
- input_select.ac_smart_modus
|
|
- input_boolean.ac_smart_steuerung_ohne_zeitplan
|
|
- input_boolean.ac_pause_aktiv
|
|
trigger: state
|
|
- id: smart_modus_pv
|
|
entity_id:
|
|
- input_boolean.ac_pv_mit_batterie
|
|
- sensor.powerocean_bpsoc
|
|
- binary_sensor.ac_pv_einschalten_erlaubt
|
|
- binary_sensor.ac_pv_ausschalten_erforderlich
|
|
- input_number.ac_pv_batterie_schwellwert
|
|
trigger: state
|
|
- id: smart_modus_temp
|
|
entity_id:
|
|
- input_number.ac_wohlfuhltemperatur_kuhlen
|
|
- input_number.ac_wohlfuhltemperatur_heizen
|
|
- sensor.wetter_aussentemperatur
|
|
- input_number.ac_temp_puffer_ein
|
|
- input_number.ac_temp_puffer_aus
|
|
trigger: state
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.ac_vorkuhlung_schlafzimmer_aktiv
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_pause_aktiv
|
|
state: 'off'
|
|
- condition: template
|
|
value_template: "{% if trigger.id == 'smart_modus_pv' %}\n {{ states('input_select.ac_smart_modus')\
|
|
\ == 'PV-Abhängig' }}\n{% elif trigger.id == 'smart_modus_temp' %}\n {{ states('input_select.ac_smart_modus')\
|
|
\ == 'Temperatur-Abhängig' }}\n{% else %}\n true\n{% endif %}\n"
|
|
actions:
|
|
- variables:
|
|
all_climates:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
manual_map:
|
|
climate.ac_hobbyraum: input_boolean.ac_manuell_hobbyraum
|
|
climate.ac_abstellraum: input_boolean.ac_manuell_abstellraum
|
|
climate.ac_kuche: input_boolean.ac_manuell_kuche
|
|
climate.ac_schlafzimmer: input_boolean.ac_manuell_schlafzimmer
|
|
climate.ac_wohnzimmer: input_boolean.ac_manuell_wohnzimmer
|
|
climate_targets: "{% set ns = namespace(devices=[]) %} {% for climate_entity\
|
|
\ in all_climates %}\n {% set manual_switch = manual_map[climate_entity]\
|
|
\ %}\n {% if is_state(manual_switch, 'off') %}\n {% set ns.devices = ns.devices\
|
|
\ + [climate_entity] %}\n {% endif %}\n{% endfor %} {{ ns.devices }}\n"
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_heizbetrieb_automatisch
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_heizbetrieb_manuell
|
|
state: 'off'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'') ==
|
|
''on'' or is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_ausschalten_erforderlich'', ''on'')
|
|
}}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Temperatur-Abhängig''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'') | float(99)
|
|
<= states(''sensor.ac_wohlfuhltemperatur_kuhlen_mit_puffer_aus'') |
|
|
float(0) }}'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- event: ac_pv_block
|
|
event_data:
|
|
mode: kuhlen
|
|
- target:
|
|
entity_id: '{{ climate_targets }}'
|
|
action: climate.turn_off
|
|
data: {}
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Temperatur-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated_temp'' }}'
|
|
then:
|
|
- data:
|
|
message_title: Klimaanlage
|
|
message_text: Anlage deaktiviert. Außentemperatur ({{ states('sensor.wetter_aussentemperatur')
|
|
| round(1) }}°C) ist kühl genug.
|
|
notification_data:
|
|
tag: ac_system_status
|
|
action: script.notification_mobile_phones
|
|
- target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated_temp
|
|
action: input_text.set_value
|
|
- target:
|
|
entity_id: '{{ climate_targets }}'
|
|
action: climate.turn_off
|
|
data: {}
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'')
|
|
== ''on'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''schedule.ac_schedule_kuhlen'') == ''on''
|
|
}}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Keine''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_einschalten_erlaubt'', ''on'')
|
|
}}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''Temperatur-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(0) >= states(''sensor.ac_wohlfuhltemperatur_kuhlen_mit_puffer_ein'')
|
|
| float(0) }}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''PV-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ is_state(''binary_sensor.ac_pv_einschalten_erlaubt'',
|
|
''on'') }}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''Temperatur-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(0) >= states(''sensor.ac_wohlfuhltemperatur_kuhlen_mit_puffer_ein'')
|
|
| float(0) }}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''=='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''activated_cool'' }}'
|
|
then:
|
|
- data:
|
|
message_title: Klimaanlage
|
|
message_text: Wird aktiviert (Kühlbetrieb)
|
|
notification_data:
|
|
tag: ac_system_status
|
|
action: script.notification_mobile_phones
|
|
- target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: activated_cool
|
|
action: input_text.set_value
|
|
- target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
hvac_mode: cool
|
|
action: climate.set_hvac_mode
|
|
- target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
temperature: '{{ states(''input_number.ac_wohlfuhltemperatur_kuhlen'')
|
|
| float(24) }}'
|
|
action: climate.set_temperature
|
|
default:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated'' }}'
|
|
then:
|
|
- data:
|
|
message_title: Klimaanlage
|
|
message_text: Wird deaktiviert (Zeitplan Ende).
|
|
notification_data:
|
|
tag: ac_system_status
|
|
action: script.notification_mobile_phones
|
|
- target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated
|
|
action: input_text.set_value
|
|
- target:
|
|
entity_id: '{{ climate_targets }}'
|
|
action: climate.turn_off
|
|
data: {}
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_heizbetrieb_automatisch
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_heizbetrieb_manuell
|
|
state: 'on'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'') ==
|
|
''on'' or is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_ausschalten_erforderlich'', ''on'')
|
|
}}'
|
|
- condition: template
|
|
value_template: "{{ states('input_select.ac_smart_modus') == 'Temperatur-Abhängig'\
|
|
\ and\n states('sensor.wetter_aussentemperatur') | float(-99) >=\
|
|
\ states('sensor.ac_wohlfuhltemperatur_heizen_mit_puffer_aus') | float(0)\
|
|
\ }}"
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- event: ac_pv_block
|
|
event_data:
|
|
mode: heizen
|
|
- target:
|
|
entity_id: '{{ climate_targets }}'
|
|
action: climate.turn_off
|
|
data: {}
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Temperatur-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated_temp'' }}'
|
|
then:
|
|
- data:
|
|
message_title: Klimaanlage
|
|
message_text: Anlage deaktiviert. Außentemperatur ({{ states('sensor.wetter_aussentemperatur')
|
|
| round(1) }}°C) ist warm genug.
|
|
notification_data:
|
|
tag: ac_system_status
|
|
action: script.notification_mobile_phones
|
|
- target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated_temp
|
|
action: input_text.set_value
|
|
- target:
|
|
entity_id: '{{ climate_targets }}'
|
|
action: climate.turn_off
|
|
data: {}
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'')
|
|
== ''on'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''schedule.ac_schedule_heizen'') == ''on''
|
|
}}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Keine''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_einschalten_erlaubt'', ''on'')
|
|
}}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''Temperatur-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(99) <= states(''sensor.ac_wohlfuhltemperatur_heizen_mit_puffer_ein'')
|
|
| float(0) }}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''PV-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ is_state(''binary_sensor.ac_pv_einschalten_erlaubt'',
|
|
''on'') }}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''Temperatur-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(99) <= states(''sensor.ac_wohlfuhltemperatur_heizen_mit_puffer_ein'')
|
|
| float(0) }}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''=='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''activated_heat'' }}'
|
|
then:
|
|
- data:
|
|
message_title: Klimaanlage
|
|
message_text: Wird aktiviert (Heizbetrieb)
|
|
notification_data:
|
|
tag: ac_system_status
|
|
action: script.notification_mobile_phones
|
|
- target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: activated_heat
|
|
action: input_text.set_value
|
|
- target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
hvac_mode: heat
|
|
action: climate.set_hvac_mode
|
|
- target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
temperature: '{{ states(''input_number.ac_wohlfuhltemperatur_heizen'')
|
|
| float(21) }}'
|
|
action: climate.set_temperature
|
|
default:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated'' }}'
|
|
then:
|
|
- data:
|
|
message_title: Klimaanlage
|
|
message_text: Wird deaktiviert.
|
|
notification_data:
|
|
tag: ac_system_status
|
|
action: script.notification_mobile_phones
|
|
- target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated
|
|
action: input_text.set_value
|
|
- target:
|
|
entity_id: '{{ climate_targets }}'
|
|
action: climate.turn_off
|
|
data: {}
|
|
mode: single
|
|
- alias: AC Steuerung
|
|
description: ''
|
|
triggers:
|
|
- platform: state
|
|
entity_id:
|
|
- schedule.ac_schedule_heizen
|
|
id: schedule_heizen
|
|
- platform: state
|
|
entity_id:
|
|
- schedule.ac_schedule_kuhlen
|
|
id: schedule_kühlen
|
|
- platform: state
|
|
id: einstellungen
|
|
entity_id:
|
|
- input_boolean.ac_schedule_verwenden
|
|
- binary_sensor.ac_heizbetrieb_automatisch
|
|
- input_boolean.ac_heizbetrieb_manuell
|
|
- input_number.ac_heizen_schwelltemperatur
|
|
- input_select.ac_smart_modus
|
|
- input_boolean.ac_smart_steuerung_ohne_zeitplan
|
|
- input_boolean.ac_pause_aktiv
|
|
- platform: state
|
|
id: smart_modus_pv
|
|
entity_id:
|
|
- input_boolean.ac_pv_mit_batterie
|
|
- sensor.powerocean_bpsoc
|
|
- binary_sensor.ac_pv_einschalten_erlaubt
|
|
- binary_sensor.ac_pv_ausschalten_erforderlich
|
|
- input_number.ac_pv_batterie_schwellwert
|
|
- platform: state
|
|
id: smart_modus_temp
|
|
entity_id:
|
|
- input_number.ac_wohlfuhltemperatur_kuhlen
|
|
- input_number.ac_wohlfuhltemperatur_heizen
|
|
- sensor.wetter_aussentemperatur
|
|
- input_number.ac_temp_puffer_ein
|
|
- input_number.ac_temp_puffer_aus
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.ac_vorkuhlung_schlafzimmer_aktiv
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_pause_aktiv
|
|
state: 'off'
|
|
- condition: template
|
|
value_template: "{% if trigger.id == 'smart_modus_pv' %}\n {{ states('input_select.ac_smart_modus')\
|
|
\ == 'PV-Abhängig' }}\n{% elif trigger.id == 'smart_modus_temp' %}\n {{ states('input_select.ac_smart_modus')\
|
|
\ == 'Temperatur-Abhängig' }}\n{% else %}\n true\n{% endif %}\n"
|
|
actions:
|
|
- variables:
|
|
all_climates:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
manual_map:
|
|
climate.ac_hobbyraum: input_boolean.ac_manuell_hobbyraum
|
|
climate.ac_abstellraum: input_boolean.ac_manuell_abstellraum
|
|
climate.ac_kuche: input_boolean.ac_manuell_kuche
|
|
climate.ac_schlafzimmer: input_boolean.ac_manuell_schlafzimmer
|
|
climate.ac_wohnzimmer: input_boolean.ac_manuell_wohnzimmer
|
|
climate_targets: "{% set ns = namespace(devices=[]) %} {% for climate_entity\
|
|
\ in all_climates %}\n {% set manual_switch = manual_map[climate_entity]\
|
|
\ %}\n {% if is_state(manual_switch, 'off') %}\n {% set ns.devices = ns.devices\
|
|
\ + [climate_entity] %}\n {% endif %}\n{% endfor %} {{ ns.devices }}\n"
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_heizbetrieb_automatisch
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_heizbetrieb_manuell
|
|
state: 'off'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'') ==
|
|
''on'' or is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_ausschalten_erforderlich'', ''on'')
|
|
}}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Temperatur-Abhängig''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'') | float(99)
|
|
<= states(''sensor.ac_wohlfuhltemperatur_kuhlen_mit_puffer_aus'') |
|
|
float(0) }}'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- event: ac_pv_block
|
|
event_data:
|
|
mode: kuhlen
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Temperatur-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated_temp'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Klimaanlage deaktiviert. Außentemperatur ({{ states('sensor.wetter_aussentemperatur')
|
|
| round(1) }}°C) ist kühl genug.
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated_temp
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'')
|
|
== ''on'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''schedule.ac_schedule_kuhlen'') == ''on''
|
|
}}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Keine''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_einschalten_erlaubt'', ''on'')
|
|
}}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''Temperatur-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(0) >= states(''sensor.ac_wohlfuhltemperatur_kuhlen_mit_puffer_ein'')
|
|
| float(0) }}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''PV-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ is_state(''binary_sensor.ac_pv_einschalten_erlaubt'',
|
|
''on'') }}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''Temperatur-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(0) >= states(''sensor.ac_wohlfuhltemperatur_kuhlen_mit_puffer_ein'')
|
|
| float(0) }}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''=='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''activated_cool'' }}'
|
|
then:
|
|
- variables:
|
|
activation_reason: "{% set smart_mode = states('input_select.ac_smart_modus')\
|
|
\ %} {% if smart_mode == 'PV-Abhängig' %}\n (PV-Überschuss, Batterie\
|
|
\ bei {{ states('sensor.powerocean_bpsoc') | int }}%)\n{% elif smart_mode\
|
|
\ == 'Temperatur-Abhängig' %}\n (Außentemperatur: {{ states('sensor.wetter_aussentemperatur')\
|
|
\ | round(1) }}°C)\n{% else %}\n (Zeitplan)\n{% endif %}"
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Klimaanlage wird aktiviert (Kühlbetrieb) {{ activation_reason
|
|
}}
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: activated_cool
|
|
- service: climate.set_hvac_mode
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
hvac_mode: cool
|
|
- service: climate.set_temperature
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
temperature: '{{ states(''input_number.ac_wohlfuhltemperatur_kuhlen'')
|
|
| float(24) }}'
|
|
default:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Klimaanlage wird deaktiviert (Zeitplan Ende).
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_heizbetrieb_automatisch
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_heizbetrieb_manuell
|
|
state: 'on'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'') ==
|
|
''on'' or is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_ausschalten_erforderlich'', ''on'')
|
|
}}'
|
|
- condition: template
|
|
value_template: "{{ states('input_select.ac_smart_modus') == 'Temperatur-Abhängig'\
|
|
\ and\n states('sensor.wetter_aussentemperatur') | float(-99) >=\
|
|
\ states('sensor.ac_wohlfuhltemperatur_heizen_mit_puffer_aus') | float(0)\
|
|
\ }}"
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- event: ac_pv_block
|
|
event_data:
|
|
mode: heizen
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Temperatur-Abhängig''
|
|
}}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated_temp'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Klimaanlage deaktiviert. Außentemperatur ({{ states('sensor.wetter_aussentemperatur')
|
|
| round(1) }}°C) ist warm genug.
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated_temp
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_boolean.ac_schedule_verwenden'')
|
|
== ''on'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''schedule.ac_schedule_heizen'') == ''on''
|
|
}}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''Keine''
|
|
}}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') == ''PV-Abhängig''
|
|
and is_state(''binary_sensor.ac_pv_einschalten_erlaubt'', ''on'')
|
|
}}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''Temperatur-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(99) <= states(''sensor.ac_wohlfuhltemperatur_heizen_mit_puffer_ein'')
|
|
| float(0) }}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_boolean.ac_smart_steuerung_ohne_zeitplan'',
|
|
''on'') }}'
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''PV-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ is_state(''binary_sensor.ac_pv_einschalten_erlaubt'',
|
|
''on'') }}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''input_select.ac_smart_modus'') ==
|
|
''Temperatur-Abhängig'' }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(99) <= states(''sensor.ac_wohlfuhltemperatur_heizen_mit_puffer_ein'')
|
|
| float(0) }}'
|
|
sequence:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''=='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''activated_heat'' }}'
|
|
then:
|
|
- variables:
|
|
activation_reason: "{% set smart_mode = states('input_select.ac_smart_modus')\
|
|
\ %} {% if smart_mode == 'PV-Abhängig' %}\n (PV-Überschuss, Batterie\
|
|
\ bei {{ states('sensor.powerocean_bpsoc') | int }}%)\n{% elif smart_mode\
|
|
\ == 'Temperatur-Abhängig' %}\n (Außentemperatur: {{ states('sensor.wetter_aussentemperatur')\
|
|
\ | round(1) }}°C)\n{% else %}\n (Zeitplan)\n{% endif %}"
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Klimaanlage wird aktiviert (Heizbetrieb) {{ activation_reason
|
|
}}
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: activated_heat
|
|
- service: climate.set_hvac_mode
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
hvac_mode: heat
|
|
- service: climate.set_temperature
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
temperature: '{{ states(''input_number.ac_wohlfuhltemperatur_heizen'')
|
|
| float(21) }}'
|
|
default:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated'' }}'
|
|
then:
|
|
- variables:
|
|
deactivation_reason: "{% if trigger.id == 'schedule_heizen' %}\n (Zeitplan\
|
|
\ beendet)\n{% else %}\n (Einstellung geändert)\n{% endif %}"
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Klimaanlage wird deaktiviert {{ deactivation_reason }}
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
mode: single
|
|
- alias: AC Steuerung
|
|
description: ''
|
|
triggers:
|
|
- platform: state
|
|
entity_id:
|
|
- schedule.ac_schedule_heizen
|
|
id: schedule_heizen
|
|
- platform: state
|
|
entity_id:
|
|
- schedule.ac_schedule_kuhlen
|
|
id: schedule_kühlen
|
|
- platform: state
|
|
id: einstellungen
|
|
entity_id:
|
|
- input_boolean.ac_schedule_verwenden
|
|
- binary_sensor.ac_heizbetrieb_automatisch
|
|
- input_boolean.ac_heizbetrieb_manuell
|
|
- input_number.ac_heizen_schwelltemperatur
|
|
- input_select.ac_smart_modus
|
|
- input_boolean.ac_smart_steuerung_ohne_zeitplan
|
|
- input_boolean.ac_pause_aktiv
|
|
- platform: state
|
|
id: smart_modus_pv
|
|
entity_id:
|
|
- input_boolean.ac_pv_mit_batterie
|
|
- sensor.powerocean_bpsoc
|
|
- binary_sensor.ac_pv_einschalten_erlaubt
|
|
- binary_sensor.ac_pv_ausschalten_erforderlich
|
|
- input_number.ac_pv_batterie_schwellwert
|
|
- platform: state
|
|
id: smart_modus_temp
|
|
entity_id:
|
|
- input_number.ac_wohlfuhltemperatur_kuhlen
|
|
- input_number.ac_wohlfuhltemperatur_heizen
|
|
- sensor.wetter_aussentemperatur
|
|
- sensor.ac_wohlfuhltemperatur_kuhlen_mit_puffer_ein
|
|
- sensor.ac_wohlfuhltemperatur_kuhlen_mit_puffer_aus
|
|
- sensor.ac_wohlfuhltemperatur_heizen_mit_puffer_ein
|
|
- sensor.ac_wohlfuhltemperatur_heizen_mit_puffer_aus
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.ac_vorkuhlung_schlafzimmer_aktiv
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_pause_aktiv
|
|
state: 'off'
|
|
- condition: template
|
|
value_template: "{% if trigger.id == 'smart_modus_pv' %}\n {{ states('input_select.ac_smart_modus')\
|
|
\ == 'PV-Abhängig' }}\n{% elif trigger.id == 'smart_modus_temp' %}\n {{ states('input_select.ac_smart_modus')\
|
|
\ == 'Temperatur-Abhängig' }}\n{% else %}\n true\n{% endif %}\n"
|
|
actions:
|
|
- variables:
|
|
all_climates:
|
|
- climate.ac_hobbyraum
|
|
- climate.ac_abstellraum
|
|
- climate.ac_kuche
|
|
- climate.ac_schlafzimmer
|
|
- climate.ac_wohnzimmer
|
|
manual_map:
|
|
climate.ac_hobbyraum: input_boolean.ac_manuell_hobbyraum
|
|
climate.ac_abstellraum: input_boolean.ac_manuell_abstellraum
|
|
climate.ac_kuche: input_boolean.ac_manuell_kuche
|
|
climate.ac_schlafzimmer: input_boolean.ac_manuell_schlafzimmer
|
|
climate.ac_wohnzimmer: input_boolean.ac_manuell_wohnzimmer
|
|
climate_targets: "{% set ns = namespace(devices=[]) %} {% for climate_entity\
|
|
\ in all_climates %}\n {% set manual_switch = manual_map[climate_entity]\
|
|
\ %}\n {% if is_state(manual_switch, 'off') %}\n {% set ns.devices = ns.devices\
|
|
\ + [climate_entity] %}\n {% endif %}\n{% endfor %} {{ ns.devices }}\n"
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_heizbetrieb_automatisch
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_heizbetrieb_manuell
|
|
state: 'off'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.ac_schedule_verwenden
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: schedule.ac_schedule_kuhlen
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_smart_steuerung_ohne_zeitplan
|
|
state: 'on'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.ac_smart_modus
|
|
state: Keine
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.ac_smart_modus
|
|
state: PV-Abhängig
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_pv_einschalten_erlaubt
|
|
state: 'on'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.ac_smart_modus
|
|
state: Temperatur-Abhängig
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'') |
|
|
float(0) >= states(''sensor.ac_wohlfuhltemperatur_kuhlen_mit_puffer_ein'')
|
|
| float(0) }}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''=='', ''cool'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(0) > states(''sensor.ac_wohlfuhltemperatur_kuhlen_mit_puffer_aus'')
|
|
| float(0) }}'
|
|
sequence:
|
|
- if:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''=='', ''off'') | list | count > 0 and states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''activated_cool'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Klimaanlage wird aktiviert (Kühlbetrieb)
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: activated_cool
|
|
- service: climate.set_hvac_mode
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
hvac_mode: cool
|
|
- service: climate.set_temperature
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
temperature: '{{ states(''input_number.ac_wohlfuhltemperatur_kuhlen'')
|
|
| float(24) }}'
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.ac_schedule_verwenden
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: schedule.ac_schedule_kuhlen
|
|
state: 'off'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.ac_smart_modus
|
|
state: PV-Abhängig
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_pv_ausschalten_erforderlich
|
|
state: 'on'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.ac_smart_modus
|
|
state: Temperatur-Abhängig
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'') | float(0)
|
|
<= states(''sensor.ac_wohlfuhltemperatur_kuhlen_mit_puffer_aus'')
|
|
| float(0) }}'
|
|
sequence:
|
|
- if:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 and states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Klimaanlage wird deaktiviert (Kühlen Ende).
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_heizbetrieb_automatisch
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_heizbetrieb_manuell
|
|
state: 'on'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.ac_schedule_verwenden
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: schedule.ac_schedule_heizen
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.ac_smart_steuerung_ohne_zeitplan
|
|
state: 'on'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.ac_smart_modus
|
|
state: Keine
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.ac_smart_modus
|
|
state: PV-Abhängig
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_pv_einschalten_erlaubt
|
|
state: 'on'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.ac_smart_modus
|
|
state: Temperatur-Abhängig
|
|
- condition: or
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'') |
|
|
float(99) <= states(''sensor.ac_wohlfuhltemperatur_heizen_mit_puffer_ein'')
|
|
| float(0) }}'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''=='', ''heat'') | list | count > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'')
|
|
| float(99) < states(''sensor.ac_wohlfuhltemperatur_heizen_mit_puffer_aus'')
|
|
| float(0) }}'
|
|
sequence:
|
|
- if:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''=='', ''off'') | list | count > 0 and states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''activated_heat'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Klimaanlage wird aktiviert (Heizbetrieb)
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: activated_heat
|
|
- service: climate.set_hvac_mode
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
hvac_mode: heat
|
|
- service: climate.set_temperature
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
data:
|
|
temperature: '{{ states(''input_number.ac_wohlfuhltemperatur_heizen'')
|
|
| float(21) }}'
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.ac_schedule_verwenden
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: schedule.ac_schedule_heizen
|
|
state: 'off'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.ac_smart_modus
|
|
state: PV-Abhängig
|
|
- condition: state
|
|
entity_id: binary_sensor.ac_pv_ausschalten_erforderlich
|
|
state: 'on'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.ac_smart_modus
|
|
state: Temperatur-Abhängig
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.wetter_aussentemperatur'') | float(99)
|
|
>= states(''sensor.ac_wohlfuhltemperatur_heizen_mit_puffer_aus'')
|
|
| float(0) }}'
|
|
sequence:
|
|
- if:
|
|
- condition: template
|
|
value_template: '{{ expand(climate_targets) | selectattr(''state'',
|
|
''!='', ''off'') | list | count > 0 and states(''input_text.ac_letzter_benachrichtigungs_status'')
|
|
!= ''deactivated'' }}'
|
|
then:
|
|
- service: script.notification_mobile_phones
|
|
data:
|
|
message_title: Klimaanlage
|
|
message_text: Klimaanlage wird deaktiviert (Heizen Ende).
|
|
notification_data:
|
|
tag: ac_system_status
|
|
- service: input_text.set_value
|
|
target:
|
|
entity_id: input_text.ac_letzter_benachrichtigungs_status
|
|
data:
|
|
value: deactivated
|
|
- service: climate.turn_off
|
|
target:
|
|
entity_id: '{{ climate_targets }}'
|
|
mode: single
|