Skip to content

Commit

Permalink
replace template cover for all entities with two scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rpanfili committed Jul 6, 2019
1 parent ec02300 commit 90a4fee
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
7 changes: 7 additions & 0 deletions configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ homeassistant:

cover.all:
device_class: "shutter"

script.roller_shutters_up:
icon: mdi:arrow-up-bold
friendly_name: "Up"
script.roller_shutters_down:
icon: mdi:arrow-down-bold
friendly_name: "Down"


recorder:
Expand Down
11 changes: 0 additions & 11 deletions covers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,3 @@
position_min: input_number.covers_min_position
position_min_enable: switch.automatic_cat_passage
window_sensor: binary_sensor.bedroom_room_window

- platform: template
covers:
all_roller_shutters:
friendly_name: "All roller shutters"
close_cover:
service: automation.turn_on
entity_id: automation.all_roller_shutter_down
open_cover:
service: automation.turn_on
entity_id: automation.all_roller_shutter_up
13 changes: 12 additions & 1 deletion scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,15 @@ test_cover:
payload: "{{ position }}"
- service: notify.telegram2rubens
data_template:
message: "Pizza connection! Posizione: {{ position }}"
message: "Pizza connection! Posizione: {{ position }}"

roller_shutters_up:
alias: "Shutters up"
sequence:
- service: cover.open_cover
entity_id: cover.all
roller_shutters_down:
alias: "Shutters down"
sequence:
- service: cover.close_cover
entity_id: cover.all
3 changes: 2 additions & 1 deletion ui-lovelace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ views:
title: Global
show_header_toggle: true
entities:
- cover.all_roller_shutters
- script.roller_shutters_up
- script.roller_shutters_down
- type: entities
title: Kitchen
show_header_toggle: true
Expand Down

0 comments on commit 90a4fee

Please sign in to comment.