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

标题: HA控制燃气炉自动化 [打印本页]

作者: yylwhy    时间: 2020-1-15 08:38
标题: HA控制燃气炉自动化
本帖最后由 yylwhy 于 2020-1-15 20:07 编辑

sensor.zm1_woshi_temperature    卧室温度

switch.nuan_qi_kai_guan               控制燃气炉的开关


1、周一到周六  16:30~次日5:30  温度到达 20° 停止 燃气炉
2、周日全天 温度到达20° 停止 燃气炉
3、周一到周六 5:31~16:29  无论多少度   都不启动
4、周一到周六  16:30~次日5:30 温度低于18°  启动  燃气炉
5、周日全天 温度低于18° 启动  燃气炉



现在在ui的做的,要么不启动要么时间不对。。求指导啊~~~

  1. - id: '1579008680809'
  2.   alias: 启动燃气炉
  3.   description: 低于18度启动燃气炉
  4.   trigger:
  5.   - below: '18'
  6.     entity_id: sensor.zm1_woshi_temperature
  7.     platform: numeric_state
  8.   condition: []
  9.   action:
  10.   - entity_id: switch.nuan_qi_kai_guan
  11.     service: switch.turn_on
  12. - id: '1579008789421'
  13.   alias: 停止燃气炉
  14.   description: 温度高于18.3度停止燃气炉
  15.   trigger:
  16.   - above: '18.3'
  17.     entity_id: sensor.zm1_woshi_temperature
  18.     platform: numeric_state
  19.   condition: []
  20.   action:
  21.   - entity_id: switch.nuan_qi_kai_guan
  22.     service: switch.turn_off
复制代码



作者: xuyang    时间: 2020-1-15 10:37
不贴代码,怎么排错?
作者: natic    时间: 2020-1-15 11:05
排查一下时区是否正确,以及触发时间和实际时间之间的关系
作者: antsunzj    时间: 2020-1-15 13:11
用node-red两分钟解决。
不过学nodered可能要两天
作者: yylwhy    时间: 2020-1-15 14:11
antsunzj 发表于 2020-1-15 13:11
用node-red两分钟解决。
不过学nodered可能要两天

萝卜大神 ~~~
作者: yylwhy    时间: 2020-1-16 08:29
xuyang 发表于 2020-1-15 10:37
不贴代码,怎么排错?

贴了。帮忙看一下?  时间那个  怎么加都不对。。我给删了
作者: yylwhy    时间: 2020-1-16 08:31
natic 发表于 2020-1-15 11:05
排查一下时区是否正确,以及触发时间和实际时间之间的关系

额。怎么看。。。在哪里查


配置-统用-里面的那个时区是对的
作者: xuyang    时间: 2020-1-16 11:15
initial_state: true
这句怎么没有
作者: yylwhy    时间: 2020-1-17 09:47
xuyang 发表于 2020-1-15 10:37
不贴代码,怎么排错?
  1. #启动
  2. - alias: switch.heater.auto_on      #低于18度启动燃气炉
  3.   initial_state: true  ##在你重启HA的时候这个自动化是开启(true)还是关闭(false)
  4.   hide_entity: false  #隐藏自动化
  5.   trigger:            #触发
  6.     - platform: numeric_state   #数字类状态、温度低于18度
  7.       entity_id: sensor.zm1_woshi_temperature
  8.       below: 18
  9.   condition:
  10.     condition: time #时间条件:周一到周六  16:30~5:30
  11.     after: '16:30:00'
  12.     before: '5:30:00'
  13.     weekday:
  14.       - mon
  15.       - tue
  16.       - wed
  17.       - thu
  18.       - fri
  19.       - sat
  20.   action:
  21.     service: switch.turn_on
  22.     entity_id: switch.nuan_qi_kai_guan
  23. #停止
  24. - alias: switch.heater.auto_off      #高于18.3度停止燃气炉
  25.   initial_state: true  ##在你重启HA的时候这个自动化是开启(true)还是关闭(false)
  26.   hide_entity: false  #隐藏自动化
  27.   trigger:            #触发
  28.     - platform: numeric_state   #数字类状态、温度低于18度
  29.       entity_id: sensor.zm1_woshi_temperature
  30.       above: 18.3
  31.   condition:
  32.     condition: time #时间条件:周一到周六  16:30~5:30
  33.     after: '16:30:00'
  34.     before: '5:30:00'
  35.     weekday:
  36.       - mon
  37.       - tue
  38.       - wed
  39.       - thu
  40.       - fri
  41.       - sat
  42.   action:
  43.     service: switch.turn_off
  44.     entity_id: switch.nuan_qi_kai_guan
复制代码


帮忙看看谢谢
作者: xuyang    时间: 2020-1-17 21:07
https://bbs.hassbian.com/thread-7124-1-1.html
参考一下,我现在用的是
  1.   trigger:
  2.   - platform: time_pattern
  3.     minutes: '/5'
  4.     seconds: '0'
  5.   condition:
  6.     condition: and
  7.     conditions:
  8.       - condition: time
  9.         after: '19:01:00'
  10.         before: '04:00:00'
  11.       - condition: numeric_state
  12.         entity_id: sensor.mi_ly_sd
  13.         below: 55
  14.       - condition: state
  15.         entity_id: switch.201_sw1
  16.         state: 'off'
  17.       - condition: state
  18.         entity_id: switch.213_sw6x  #加湿器自动开状态
  19.         state: 'on'
  20.   action:
  21.   - service: switch.turn_on
  22.     data:
  23.       entity_id: switch.201_sw1
复制代码







欢迎光临 『瀚思彼岸』» 智能家居技术论坛 (https://bbs.hassbian.com/) Powered by Discuz! X3.5