From b92b6ec3714253ca3729716c865b7f47ffa67a1a Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Sat, 4 May 2019 22:49:14 +0200 Subject: [PATCH] Added bathroom cumulative light --- light/bagno.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/light/bagno.yaml b/light/bagno.yaml index 3e129096..e4324ad6 100644 --- a/light/bagno.yaml +++ b/light/bagno.yaml @@ -25,3 +25,25 @@ retain: false qos: 0 optimistic: false + +###################################################################### +# Bathroom Global +###################################################################### + +- platform: template + lights: + luci_bagno: + friendly_name: "Luci Bagno" + turn_on: + service: light.turn_on + entity_id: "light.luce_bagno, light.luce_specchio" + turn_off: + service: light.turn_off + entity_id: "light.luce_bagno, light.luce_specchio" + value_template: >- + {% if is_state('light.luce_bagno', 'on') or is_state('light.luce_specchio', 'on') %} + on + {% else %} + off + {% endif %} + icon_template: mdi:lightbulb -- 2.47.3