本帖最后由 shayulei 于 2023-7-17 09:04 编辑
我的T7 PRO通过xiaomi miio集成接入HA,我写的一个自动化,,要求是离家后或每天3点全屋清扫,一直用的好好的,但最近因为开空调,很多房间门都关着,于是我手动一间间打扫了一下,结果我发现扫地机器人的下一次自动化只会扫我最后一次手动清扫的房间,而不是全屋。
以下是我的自动化代码:
alias: 清扫
description: ""
trigger:
- platform: time
at: "15:00:00"
enabled: true
- platform: state
entity_id:
- group.familymember
to: not_home
for:
hours: 0
minutes: 30
seconds: 0
enabled: true
condition:
- condition: time
after: "07:00:00"
before: "19:00:00"
- condition: template
value_template: >-
{{(now()-as_datetime(states('sensor.sao_di_ji_qi_ren_last_clean_end')))>timedelta(
hours = 15)}}
action:
- device_id: baa29cea83f100ca440d0cc48e5710e8
domain: vacuum
entity_id: vacuum.sao_di_ji_qi_ren
type: clean
- service: automation.turn_off
data:
stop_actions: true
target:
entity_id: automation.hong_wai_bu_fang
enabled: false
mode: single
|