1
0

Add window blind

This commit is contained in:
pgrondek 2021-04-29 23:26:10 +02:00
parent 542a359adc
commit a11c2a60e4
2 changed files with 47 additions and 15 deletions

View File

@ -5,21 +5,24 @@
- platform: time - platform: time
at: input_datetime.alarm at: input_datetime.alarm
action: action:
- service: light.turn_on # - service: light.turn_on
data: # data:
kelvin: 2000 # kelvin: 2000
brightness: 1 # brightness: 1
entity_id: # entity_id:
- light.bedroom_1 # - light.bedroom_1
- light.bedroom_2 # - light.bedroom_2
- service: light.turn_on # - service: light.turn_on
data: # data:
kelvin: 5300 # kelvin: 5300
transition: 1800 # transition: 1800
brightness: 255 # brightness: 255
entity_id: # entity_id:
- light.bedroom_1 # - light.bedroom_1
- light.bedroom_2 # - light.bedroom_2
- service: cover.open_cover
target:
entity_id: cover.bedroom_blind
- delay: '15' - delay: '15'
- service: media_player.volume_set - service: media_player.volume_set
data: data:

View File

@ -25,6 +25,9 @@ zwave:
config_path: /config/open-zwave/config config_path: /config/open-zwave/config
network_key: !secret zwave_network_key network_key: !secret zwave_network_key
mqtt:
broker: 127.0.0.1
octoprint: octoprint:
host: prusa.lan host: prusa.lan
port: 5000 port: 5000
@ -496,3 +499,29 @@ input_number:
max: 3 max: 3
step: 1 step: 1
icon: "mdi:weather-windy" 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 %}