From a11c2a60e41cd136bf1268163189a408f8b0673e Mon Sep 17 00:00:00 2001 From: pgrondek Date: Thu, 29 Apr 2021 23:26:10 +0200 Subject: [PATCH] Add window blind --- .../files/automations/alarm-clock.yaml | 33 ++++++++++--------- automations/files/configuration.yaml | 29 ++++++++++++++++ 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/automations/files/automations/alarm-clock.yaml b/automations/files/automations/alarm-clock.yaml index a01d81d..3fa7e5c 100644 --- a/automations/files/automations/alarm-clock.yaml +++ b/automations/files/automations/alarm-clock.yaml @@ -5,21 +5,24 @@ - platform: time at: input_datetime.alarm action: - - service: light.turn_on - data: - kelvin: 2000 - brightness: 1 - entity_id: - - light.bedroom_1 - - light.bedroom_2 - - service: light.turn_on - data: - kelvin: 5300 - transition: 1800 - brightness: 255 - entity_id: - - light.bedroom_1 - - light.bedroom_2 +# - service: light.turn_on +# data: +# kelvin: 2000 +# brightness: 1 +# entity_id: +# - light.bedroom_1 +# - light.bedroom_2 +# - service: light.turn_on +# data: +# kelvin: 5300 +# transition: 1800 +# brightness: 255 +# entity_id: +# - light.bedroom_1 +# - light.bedroom_2 + - service: cover.open_cover + target: + entity_id: cover.bedroom_blind - delay: '15' - service: media_player.volume_set data: diff --git a/automations/files/configuration.yaml b/automations/files/configuration.yaml index e0ec826..78921a4 100644 --- a/automations/files/configuration.yaml +++ b/automations/files/configuration.yaml @@ -25,6 +25,9 @@ zwave: config_path: /config/open-zwave/config network_key: !secret zwave_network_key +mqtt: + broker: 127.0.0.1 + octoprint: host: prusa.lan port: 5000 @@ -496,3 +499,29 @@ input_number: max: 3 step: 1 icon: "mdi:weather-windy" + +cover: + - platform: template + covers: + bedroom_blind: + device_class: blind + friendly_name: "Bedroom Blind" + value_template: "{{ state_attr('light.zemismart_blind', 'brightness') > 10 }}" + open_cover: + service: light.turn_on + target: + entity_id: light.zemismart_blind + data: + brightness: 255 + close_cover: + service: light.turn_on + target: + entity_id: light.zemismart_blind + data: + brightness: 1 + icon_template: > + {%- if state_attr('light.zemismart_blind', 'brightness') > 10 -%} + mdi:window-shutter-open + {% else %} + mdi:window-shutter + {% endif %} \ No newline at end of file