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

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

【已解决】老的自动化脚本,升级HASS后不执行。

[复制链接]

7

主题

125

帖子

620

积分

高级会员

Rank: 4

积分
620
金钱
490
HASS币
20
发表于 2020-6-26 20:38:37 | 显示全部楼层 |阅读模式
本帖最后由 ylfzl 于 2020-6-27 12:46 编辑

那位老大帮我看看这个段代码为什么不执行了,在103的版本是正常,后来升级到111.4版本就不执行了。是因为升级系统的原因导至命令改了吗?

万分感谢


因为装的虚拟机,装完系统后,时区不对,所以HASS的时间不对,所以自动没有触发

                               
登录/注册后可看大图

                               
登录/注册后可看大图

                               
登录/注册后可看大图

                               
登录/注册后可看大图

                               
登录/注册后可看大图



- id: '1577592703881'
  alias: 厨房自动开关灯
  description: 厨房自动开关灯
  initial_state: true
  # hide_entity: true
  trigger: 
    - platform: state
      entity_id: binary_sensor.motion_sensor_158d00012a2195  #人体传感器
      to: 'on'
    - platform: state
      entity_id: binary_sensor.motion_sensor_158d00012a2195  #人体传感器
      to: 'off'
  condition:
    condition: and #同时满足如下条件,则开夜灯
    conditions:
      - condition: numeric_state
        entity_id: 'sensor.illumination_34ce0083908f' #判断光线是否足够暗
        below: '500'
      - condition: time     #时间判断
        after: '17:00:00'
        before: '06:00:00'
  action:
      #通过IF判断感应器的状态
    - service_template: "switch.turn_{% if trigger.to_state.state == 'on' %}on{% else %}off{% endif %}"
      entity_id: switch.sonoff_10009d64f5 #灯
在UI的自动化里出现以下:
火狐截图_2020-06-26T12-37-14.326Z.png

回复

使用道具 举报

0

主题

105

帖子

1167

积分

论坛积极会员

积分
1167
金钱
1062
HASS币
0
发表于 2020-6-26 21:36:41 | 显示全部楼层
我的也是升级到111.4以后人体感应的失灵了,应该命令变了吧?
系统还报错误:
The following integrations and platforms could not be set up:

group
automation
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-24 06:01 , Processed in 0.053610 second(s), 26 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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