From f6fdc3a677ed5d4b72e1d1af69f88c6c41e3c8ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Grondek?= Date: Mon, 22 Apr 2024 19:34:44 +0200 Subject: [PATCH] Auto turn computer off --- .../automations/office-computer-lights.yaml | 14 -------------- configuration/automations/office-computer-off.yaml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 14 deletions(-) delete mode 100644 configuration/automations/office-computer-lights.yaml create mode 100644 configuration/automations/office-computer-off.yaml diff --git a/configuration/automations/office-computer-lights.yaml b/configuration/automations/office-computer-lights.yaml deleted file mode 100644 index 1fae47a..0000000 --- a/configuration/automations/office-computer-lights.yaml +++ /dev/null @@ -1,14 +0,0 @@ -- id: computer_off - alias: '[Computer Cave] Turning computer off automation' - description: '' - trigger: - - platform: state - entity_id: binary_sensor.hulk_ping - to: 'off' - for: - minutes: 5 - action: - - service: light.turn_off - entity_id: - - light.office - mode: single \ No newline at end of file diff --git a/configuration/automations/office-computer-off.yaml b/configuration/automations/office-computer-off.yaml new file mode 100644 index 0000000..6ff7d9a --- /dev/null +++ b/configuration/automations/office-computer-off.yaml @@ -0,0 +1,12 @@ +- id: office_computer_auto_off + alias: '[Office] Turning computer off' + mode: single + trigger: + - platform: numeric_state + entity_id: sensor.computer_outlet_electrical_measurement + for: + minutes: 15 + action: + - service: switch.turn_off + target: + entity_id: switch.computer_outlet