『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 1046|回复: 1

[求助] 求自动化怎么写

[复制链接]

45

主题

453

帖子

1655

积分

金牌会员

Rank: 6Rank: 6

积分
1655
金钱
1202
HASS币
0
发表于 2023-4-12 08:47:14 | 显示全部楼层 |阅读模式
如果在22点到1点这个时间段内,只要我在家1小时以上,就运行一个动作。
怎么写。
回复

使用道具 举报

5

主题

472

帖子

2122

积分

金牌会员

Rank: 6Rank: 6

积分
2122
金钱
1650
HASS币
0
发表于 2023-4-12 09:57:03 | 显示全部楼层
trigger:
  - platform: time_pattern
    minutes: /1
action:
   - choose:
      - conditions:
          - "{{  now() >= today_at(\"22:00\") or now() <= today_at(\"1:00\") }}"
          - >-
            {{ ((as_timestamp(now())
            -as_timestamp(states.device_tracker.ikuai_xxxx))/60)|float|
            round(0)>= 60 and is_state('device_tracker.ikuai_xxxx','home') }}
         sequence:
          - service: xxxx
            target:
              entity_id: xxxx
            data: {}
         
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2025-2-26 04:46 , Processed in 1.075325 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表