Improve Roborock auto-start trigger and add debug notifications

This commit is contained in:
2026-04-09 18:21:30 +02:00
parent 2918b73d3e
commit e541b658bd
+29 -25
View File
@@ -46,34 +46,29 @@
mode: single mode: single
trigger: trigger:
- platform: time_pattern - platform: state
minutes: "/5"
condition:
- condition: state
entity_id: binary_sensor.family_presence entity_id: binary_sensor.family_presence
state: "off" to: "off"
for: "00:05:00"
- condition: template variables:
value_template: > roborock_family_away: "{{ is_state('binary_sensor.family_presence', 'off') }}"
{% set t = state_attr('input_datetime.house_became_empty', 'timestamp') %} roborock_auto_runs: "{{ states('input_number.roborock_auto_runs_today') | int(0) }}"
{{ t is not none and (as_timestamp(now()) - t) > 300 }} roborock_is_cleaning: "{{ is_state('vacuum.roborock_s8_pro_ultra', 'cleaning') }}"
roborock_battery: "{{ state_attr('vacuum.roborock_s8_pro_ultra', 'battery_level') | int(0) }}"
- condition: numeric_state
entity_id: input_number.roborock_auto_runs_today
below: 2
- condition: not
conditions:
- condition: state
entity_id: vacuum.roborock_s8_pro_ultra
state: "cleaning"
- condition: template
value_template: >
{{ state_attr('vacuum.roborock_s8_pro_ultra','battery_level') | int(0) > 20 }}
action: action:
- choose:
- conditions:
- condition: template
value_template: >
{{
roborock_family_away
and roborock_auto_runs < 2
and not roborock_is_cleaning
and roborock_battery > 20
}}
sequence:
- service: button.press - service: button.press
target: target:
entity_id: button.roborock_s8_pro_ultra_kokken_bryggers entity_id: button.roborock_s8_pro_ultra_kokken_bryggers
@@ -81,7 +76,6 @@
- delay: "00:00:20" - delay: "00:00:20"
- choose: - choose:
- conditions: - conditions:
- condition: state - condition: state
entity_id: vacuum.roborock_s8_pro_ultra entity_id: vacuum.roborock_s8_pro_ultra
@@ -110,6 +104,16 @@
data: data:
title: "⚠️ Roborock start fejlede" title: "⚠️ Roborock start fejlede"
message: "Startkommando sendt, men den begyndte ikke at køre." message: "Startkommando sendt, men den begyndte ikke at køre."
default:
- service: notify.mobile_app_claus_iphone_15pro
data:
title: "️ Roborock ikke startet"
message: >
Smart rengøring blev sprunget over.
Familie hjemme: {{ not roborock_family_away }}.
Auto-kørsler i dag: {{ roborock_auto_runs }}.
Kører allerede: {{ roborock_is_cleaning }}.
Batteri: {{ roborock_battery }}%.
# 🏠 Stop når nogen kommer hjem # 🏠 Stop når nogen kommer hjem