From 380353c44e2717f1ee6c2451a0df865c719653a8 Mon Sep 17 00:00:00 2001 From: Claus Dethlefsen Date: Sun, 15 Mar 2026 15:39:46 +0100 Subject: [PATCH] =?UTF-8?q?st=C3=B8vsug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/automations/roborock.yaml | 74 +++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 include/automations/roborock.yaml diff --git a/include/automations/roborock.yaml b/include/automations/roborock.yaml new file mode 100644 index 0000000..a0d96ee --- /dev/null +++ b/include/automations/roborock.yaml @@ -0,0 +1,74 @@ +- id: roborock_smart_cleaning + alias: Roborock Smart Cleaning + mode: single + + trigger: + - id: house_empty + platform: state + entity_id: binary_sensor.family_presence + to: "off" + for: "00:30:00" + + - id: someone_home + platform: state + entity_id: binary_sensor.family_presence + to: "on" + + - id: midnight + platform: time + at: "00:00:00" + + action: + - choose: + + # 🔹 Reset daglig tæller ved midnat + - conditions: + - condition: trigger + id: midnight + sequence: + - service: input_number.set_value + target: + entity_id: input_number.roborock_auto_runs_today + data: + value: 0 + + # 🔹 Start rengøring hvis huset har været tomt i 30 min + - conditions: + - condition: trigger + id: house_empty + + - condition: numeric_state + entity_id: input_number.roborock_auto_runs_today + below: 2 + + - condition: state + entity_id: vacuum.roborock_s8_pro_ultra + state: docked + + - condition: numeric_state + entity_id: vacuum.roborock_s8_pro_ultra + attribute: battery_level + above: 20 + + sequence: + - service: button.press + target: + entity_id: button.roborock_s8_pro_ultra_kokken_bryggers + + - service: input_number.increment + target: + entity_id: input_number.roborock_auto_runs_today + + # 🔹 Stop robotten hvis nogen kommer hjem + - conditions: + - condition: trigger + id: someone_home + + - condition: state + entity_id: vacuum.roborock_s8_pro_ultra + state: cleaning + + sequence: + - service: vacuum.return_to_base + target: + entity_id: vacuum.roborock_s8_pro_ultra