From a1a6c4f7a04637574fe8f44cfe72cac4a4d35dbe Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Sun, 3 May 2020 02:43:33 +0300 Subject: [PATCH] Add titanium automation --- config/lovelace/advanced_dashboard/10_system.yaml | 3 +++ .../lovelace/home_dashboard/kitchen_dashboard.yaml | 6 +++++- .../home_dashboard/living_room_dashboard.yaml | 6 +++++- config/lovelace/home_dashboard/main_dashboard.yaml | 6 +++++- config/packages/devices/titanium.yaml | 12 ++++++++++++ 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/config/lovelace/advanced_dashboard/10_system.yaml b/config/lovelace/advanced_dashboard/10_system.yaml index c5b9aed..a761e15 100644 --- a/config/lovelace/advanced_dashboard/10_system.yaml +++ b/config/lovelace/advanced_dashboard/10_system.yaml @@ -22,6 +22,8 @@ cards: title: Automations show_header_toggle: false entities: + - automation.titanium_turn_off_when_idle + - type: divider # Presence - type: custom:fold-entity-row head: @@ -173,6 +175,7 @@ cards: - type: divider + # Purifier - type: custom:fold-entity-row head: type: custom:dummy-entity-row diff --git a/config/lovelace/home_dashboard/kitchen_dashboard.yaml b/config/lovelace/home_dashboard/kitchen_dashboard.yaml index 487c71a..10ffdac 100644 --- a/config/lovelace/home_dashboard/kitchen_dashboard.yaml +++ b/config/lovelace/home_dashboard/kitchen_dashboard.yaml @@ -74,8 +74,12 @@ - value: 'idle' styles: *on_styles - type: custom:button-card - template: default + template: + - default + - with_state_indicator entity: switch.titanium + variables: + state_indicator_id: automation.titanium_turn_off_when_idle - type: custom:decluttering-card template: media_with_controls diff --git a/config/lovelace/home_dashboard/living_room_dashboard.yaml b/config/lovelace/home_dashboard/living_room_dashboard.yaml index df0c2e2..d5f0a46 100644 --- a/config/lovelace/home_dashboard/living_room_dashboard.yaml +++ b/config/lovelace/home_dashboard/living_room_dashboard.yaml @@ -72,8 +72,12 @@ - value: 'idle' styles: *on_styles - type: custom:button-card - template: default + template: + - default + - with_state_indicator entity: switch.titanium + variables: + state_indicator_id: automation.titanium_turn_off_when_idle - type: custom:button-card template: default entity: sensor.synology_type_volume_1 diff --git a/config/lovelace/home_dashboard/main_dashboard.yaml b/config/lovelace/home_dashboard/main_dashboard.yaml index 578632e..5b9d6fa 100644 --- a/config/lovelace/home_dashboard/main_dashboard.yaml +++ b/config/lovelace/home_dashboard/main_dashboard.yaml @@ -92,8 +92,12 @@ styles: *on_styles - type: custom:button-card - template: default + template: + - default + - with_state_indicator entity: switch.titanium + variables: + state_indicator_id: automation.titanium_turn_off_when_idle - type: custom:button-card template: default diff --git a/config/packages/devices/titanium.yaml b/config/packages/devices/titanium.yaml index 16ddd70..94ee858 100644 --- a/config/packages/devices/titanium.yaml +++ b/config/packages/devices/titanium.yaml @@ -234,3 +234,15 @@ script: data: topic: "iotlink/workgroup/titanium/refresh" payload: "" + +automation: + - alias: Titanium ยท Turn off when idle + trigger: + platform: numeric_state + entity_id: sensor.titanium_idle_time + above: 180 + action: + - service: script.titanium_shutdown + - service: script.say + data: + message: "Hey, I'm turning Titanium off. It's been idling for 3 hours."