From c8ce4f58a559380dd9beac77ffe1a6888ae337c1 Mon Sep 17 00:00:00 2001 From: GrKoR Date: Mon, 18 Apr 2022 01:50:30 +0300 Subject: [PATCH] advanced example for v.0.2.1 updated --- examples/advanced/ac_common.yaml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/examples/advanced/ac_common.yaml b/examples/advanced/ac_common.yaml index 666b8a0..b10d636 100644 --- a/examples/advanced/ac_common.yaml +++ b/examples/advanced/ac_common.yaml @@ -65,8 +65,12 @@ climate: show_action: true indoor_temperature: name: ${upper_devicename} AC Indoor Temperature - id: ac_indoor_temp - internal: true + id: ${devicename}_indoor_temp + internal: false + display_state: + name: $upper_devicename Display State + id: ${devicename}_display_state + internal: false visual: min_temperature: 16 max_temperature: 32 @@ -100,3 +104,18 @@ sensor: update_interval: 30s unit_of_measurement: "dBa" accuracy_decimals: 0 + + +switch: + - platform: template + name: $upper_devicename Display + lambda: |- + if (id(${devicename}_display_state).state) { + return true; + } else { + return false; + } + turn_on_action: + - aux_ac.display_on: aux_id + turn_off_action: + - aux_ac.display_off: aux_id \ No newline at end of file