From 90a4fee47d6a52e9a7e2667fe7034857757a5f78 Mon Sep 17 00:00:00 2001 From: Rubens Panfili Date: Sat, 6 Jul 2019 13:13:15 +0200 Subject: [PATCH] replace template cover for all entities with two scripts --- configuration.yaml | 7 +++++++ covers.yaml | 11 ----------- scripts.yaml | 13 ++++++++++++- ui-lovelace.yaml | 3 ++- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/configuration.yaml b/configuration.yaml index 9e8366c..b4d0f26 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -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: diff --git a/covers.yaml b/covers.yaml index bad531d..ea8bac5 100644 --- a/covers.yaml +++ b/covers.yaml @@ -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 \ No newline at end of file diff --git a/scripts.yaml b/scripts.yaml index d5115bd..2aa0be7 100644 --- a/scripts.yaml +++ b/scripts.yaml @@ -32,4 +32,15 @@ test_cover: payload: "{{ position }}" - service: notify.telegram2rubens data_template: - message: "Pizza connection! Posizione: {{ position }}" \ No newline at end of file + 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 \ No newline at end of file diff --git a/ui-lovelace.yaml b/ui-lovelace.yaml index a0984b9..fff4605 100644 --- a/ui-lovelace.yaml +++ b/ui-lovelace.yaml @@ -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