请选择 进入手机版 | 继续访问电脑版

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

 找回密码
 立即注册
12
返回列表 发新帖
楼主: 番茄鸡蛋面

[求助] 【已解决】求助,想咨询个DC1的自动化

[复制链接]

0

主题

60

帖子

170

积分

注册会员

Rank: 2

积分
170
金钱
110
HASS币
0
发表于 2019-11-20 20:44:30 | 显示全部楼层

感谢情非殇大佬的热心指点!

#自动化配置
automation:
  - alias: test1_dc1
    trigger:
      platform: numeric_state
      entity_id: switch.dc1_shufang
      value_template: '{{ state.attributes.p }}'
      above: 50       ##功率高于50
      for:
        seconds: 2    ##等待2秒
    condition:
      ## 如果2或者3是关闭状态
      condition: or
      conditions:
        - condition: state
          entity_id: switch.dc1_shufang_s3
          state: 'off'
        - condition: state
          entity_id: switch.dc1_shufang_s3
          state: 'off'
    action:
      ## 打开2和3开关
      ervice: switch.turn_on
      entity_id:
        - switch.dc1_shufang_s2
        - switch.dc1_shufang_s3
  - alias: test2_dc1
    trigger:
      platform: numeric_state
      entity_id: switch.dc1_shufang
      value_template: '{{ state.attributes.p }}'
      below: 50       ##功率低于50
      for:
        seconds: 2    ##等待2秒
    condition:
      ## 如果2或者3是打开状态
      condition: or
      conditions:
        - condition: state
          entity_id: switch.dc1_shufang_s3
          state: 'on'
        - condition: state
          entity_id: switch.dc1_shufang_s3
          state: 'on'
    action:
      ## 关闭2和3开关
      ervice: switch.turn_off
      entity_id:
        - switch.dc1_shufang_s2
        - switch.dc1_shufang_s3
回复

使用道具 举报

0

主题

60

帖子

170

积分

注册会员

Rank: 2

积分
170
金钱
110
HASS币
0
发表于 2019-11-20 20:47:04 | 显示全部楼层
情非殇 发表于 2019-2-9 14:53
帮不了你,你自己瞎鸡巴改,我知道你哪里问题

大佬幽默
回复

使用道具 举报

0

主题

52

帖子

759

积分

高级会员

Rank: 4

积分
759
金钱
707
HASS币
0
发表于 2023-3-26 15:41:03 | 显示全部楼层
nnssz 发表于 2019-11-20 20:44
感谢情非殇大佬的热心指点!

#自动化配置

兄弟,这个是配到哪个文件里的呀,
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-3-29 03:31 , Processed in 0.046114 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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