Forked from sotatech/window-open-notify-homematic.yaml
Last active
October 22, 2023 12:25
-
-
Save cupracer/8cfc997e52cbbe891d5e3c1f4733142b to your computer and use it in GitHub Desktop.
Notify HomeMatic when a window is open.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Heizkoerpertemperatur bei geoeffnetem Verschluss absenken | |
description: | |
An automation blueprint that reduces the set temperature of your climate | |
device or group if a contact sensor is open for more than the preset wait time. | |
It uses the Homematic window sensor channel to set the temperature to the "Open-window | |
temperature" set in the device configuration. You should set the "Mode for temperature | |
fall detection" to Inactive to avoid conflicts. It waits until the contact is closed | |
again in order to restore the climate entity temperature. It has an optional blocking | |
entity to prevent the automation running unnecessarily, for example during the | |
Summer season. | |
domain: automation | |
source_url: https://gist.github.com/cupracer/8cfc997e52cbbe891d5e3c1f4733142b | |
input: | |
contact_entity: | |
name: Contact Sensor | |
description: The contact sensor that will control the climate entity. | |
selector: | |
entity: | |
domain: binary_sensor | |
device_class: [window, door] | |
open_delay: | |
name: Open Wait Time | |
description: Time to delay after contact opens before notifying HomeMatic. | |
default: 0 | |
selector: | |
number: | |
min: 0.0 | |
max: 600.0 | |
unit_of_measurement: seconds | |
mode: slider | |
step: 1.0 | |
# blocking_entity: | |
# name: (OPTIONAL) Blocking Entity | |
# description: If this entity's state is on, it will prevent the automation from running. E.g. summer mode or away mode. | |
# default: | |
# selector: | |
# entity: | |
# domain: input_boolean | |
climate_entity: | |
name: Climate Device | |
description: The climate entity that is controlled by the contact sensor. | |
selector: | |
entity: | |
domain: climate | |
variables: | |
# blocking_entity: !input blocking_entity | |
climate_target: !input climate_entity | |
climate_address: '{{ state_attr( climate_target, "address").split(":")[0] }}' | |
open_delay: !input open_delay | |
trigger: | |
- platform: state | |
entity_id: !input "contact_entity" | |
to: "on" | |
for: !input "open_delay" | |
#condition: | |
# - condition: template | |
# value_template: "{{ (blocking_entity == none) or (states[blocking_entity].state == 'off') }}" | |
action: | |
- service: homematicip_local.set_device_value | |
data: | |
device_address: "{{ climate_address }}" | |
channel: 1 | |
parameter: WINDOW_STATE | |
value: "1" | |
value_type: int | |
- wait_for_trigger: | |
- platform: state | |
entity_id: !input "contact_entity" | |
to: "off" | |
continue_on_timeout: false | |
- service: homematicip_local.set_device_value | |
data: | |
device_address: "{{ climate_address }}" | |
channel: 1 | |
parameter: WINDOW_STATE | |
value: "0" | |
value_type: int | |
mode: restart | |
max_exceeded: silent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment