我试图触发我的Wyze Sense,以告诉我的地下室/楼梯灯在检测到运动时要亮起来,并在5分钟后自动关闭。

我到目前为止没有成功。

当通过应用程序触发时,灯可以工作这是我的运动传感器信息

我适用的配置yaml:

automation: - alias: Turn on stairs lights with motion detection trigger: platform: state entity_id: binary_sensor.wyzesense_779e9d08 to: 'On' action: service: light.turn_on entity_id: light.stairs_1 entity_id: light.stairs_2 entity_id: light.basement_bulb_1 entity_id:light.basement_bulb_2-别名:上次移动扳机后5分钟关闭楼梯灯:平台:state entity_id:binary_sensor.wyzesense_7779e9d08 to:'off''to:off for:mounter:05操作:service:service:light.turn_off entity_id:light.turn_off entity_id:light.stairs_1 airs_1 airs_1 airs_1 airs_1_1_1_1_ID:light.stairs_2 entity_id:light.basement_bulb_1 entity_id:light.basement_bulb_2

配置通过YAML检查器,但我无法成功触发灯光以打开。有什么建议么?

你好@rdeets- 阅读下面的链接文章,然后使用代码块发布YAML(在发布工具栏上看起来像)。这将使我们能够检查诸如压痕错误之类的简单事项。

“ ON”和“ OFF”与“ ON”和“ OFF”不同。这是您在检查状态时想要的最后两个。

编辑OP。

1喜欢

谢谢,更清楚。解决方案是在我以前的帖子中。

更改为小写和重新启动,没有区别。

您还需要正确打开和关闭操作。实体应为列表,即缩进并进行了“ - ”

操作:服务:light.turn_on- entity_id:light.stairs_1- entity_id:light.stairs_2- entity_id:light.basement_bulb_1- entity_id:light.basement_bulb_2

好的,我进行了这些更改,但是现在我使用配置检查器遇到了这个错误:

错误加载/config/configuration.yaml:在“/config/configuration.yaml”中解析块收集时,第134行,第2列,但在“/config/configuration.yaml”中找到'',第139行,第3列,第3列,第3行

第134行:

- 别名:带运动检测的楼梯灯

第139行:

行动:

完整配置yaml:

# Configure a default setup of 19463331伟德国际Home Assistant (frontend, api, etc) default_config: # Text to speech tts: - platform: google_translate group: !include groups.yaml automation: !include automations.yaml script: !include scripts.yaml scene:!include scenes.yaml # Example configuration.yaml entry light: - platform: flux_led automatic_add: true devices: 192.168.2.175: name: "Stairs 1" mode: "rgbw" protocol: 'ledenet' 192.168.2.227: name: "Stairs2“模式:“ RGBW”协议:'Ledenet'192.168.2.95:名称:“卧室1”模式:“ RGBW”协议:'Ledenet'192.168.2.108:name:name:“ beger 2”模式:“ rgbbw”协议:'rgbw“协议:''Ledenet'192.168.2.25:名称:“ trand_door_bulb”模式:“ RGBW”协议:'Ledenet'192.168.2.198:名称:“地下室灯泡1”模式:“ RGBW”协议:“灯泡2“模式:“ RGBW”协议:'Ledenet'192.168.2.128:名称:“客厅灯”模式:“ RGBW”协议:'Ledenet'192.168.2.136:name:“ entryway Bulb”模式:“ RGBW”协议:“ RGBW”协议:'Ledenet'192.168.2.146:名称:“饭厅灯泡“模式:“ RGBW”协议:'Ledenet'192.168.2.181:名称:“露台灯泡”模式:“ RGBW”协议:'Ledenet'192.168.2.206:name:“ bon Desk Bulb”模式:“ RGBW”协议:“ RGBW”协议:“ RGBW”协议:“ RGBW”'Ledenet'192.168.2.209:名称:“餐厅灯”模式:“ RGBW”协议:'Ledenet'192.168.2.228:名称:“ Living Room 1”模式:“ RGBW”协议:'Ledenet'192.168.2.216:名称:名称:名称::“客厅2”模式:“ RGBW”协议:'Ledenet'192.168.2.179:名称:“后院灯泡”模式:“ RGBW”协议:'Ledenet'192.168.2.252:名称:名称:“浴室天花板”模式:“ RGBW“协议:'Ledenet'192.168.2.222:名称:“浴室接收器1”模式:“ RGBW”协议:'Ledenet'192.168.2.214:名称:“浴室水槽2”模式:“ RGBW”协议:“ RGBW”协议:'Ledenet'192.168。2.148:姓名:“浴室接收器3”模式:“ RGBW”协议:'Ledenet'192.168.2.79:名称:“ Office Bulb 1”模式:“ RGBW”协议:'Ledenet'192.168.2.207:name:name:“ name:” Office Bulb 2“模式:“ RGBW”协议:'Ledenet'192.168.2.184:名称:“烧烤灯”模式:“ RGBW”协议:'Ledenet'192.168.2.8:name:name:“ Rec Room 1”模式:“ RGBBW”协议:'Ledenet'192.168.2.160:名称:“ REC ROOM 2”模式:“ RGBW”协议:'Ledenet'192.168.2.31:名称:“ REC ROOM 3”模式:“ RGBW”协议:“ RGBW”协议:'Ledenet'192.168.2.1022:名称:“ REC ROOM 4”模式:“ RGBW”协议:'Ledenet'192.168.2.190:名称:“走廊灯泡”模式:“ RGBW”协议:'Ledenet'Ledenet'Binary_sensor: - 平台: -  Wyzesense:Wyzesense设备:自动自动化: - 自动化: - alias: Turn on stairs lights with motion detection trigger: platform: state entity_id: binary_sensor.wyzesense_779e9d08 to: 'on' action: service: light.turn_on - entity_id: light.stairs_1 - entity_id: light.stairs_2 - entity_id: light.basement_bulb_1 - entity_id: light.basement_bulb_2 - alias: Turn off Stairs lights 5 minutes after last movement trigger: platform: state entity_id: binary_sensor.wyzesense_779e9d08 to: 'off' for: minutes: 05 action: service: light.turn_off - entity_id: light.stairs_1 - entity_id: light.stairs_2 - entity_id: light.basement_bulb_1 - entity_id: light.basement_bulb_2

对不起,我在手机上,没有集中精力。应该这样:

操作:服务:light.turn_on entity_id:-light.stairs_1 -light.stairs_2 -light.basement_bulb_1 -light.basement_bulb_2

好的,我当前的配置。YAML从第133行开始:

自动化: - 别名:带运动检测扳机的楼梯灯:平台:state entity_id:binary_sensor.wyzesense_779e9d08 to:'ON'on''''措施:服务:light.turn_on entity_id:-light.stairs_1 -light.stairs_1 -light.stairs_2 -light.basement_basement_basement_bulb_1- light.basement_bulb_1- light。.basement_bulb_2-别名:上次移动触发器后5分钟关闭楼梯灯:平台:state entity_id:binary_sensor.wyzesense_7799e9d08 to:'off'to:'off'''''''''for:5 for:5 minter:5动作:服务:light.turn_off entity_id:light.turn_off entity_id:-light.stairs_1-airs_1 -light。stairs_2 -light.basement_bulb_1 -light.basement_bulb_2

当前错误:

错误加载/config/configuration.yaml:在“/config/configuration.yaml”中解析块映射时,第3行,第1列,但在“/config/configuration.yaml”中找到'',第146行,第2列,第2列,第2列,

第3行:

default_config:

第146行:

- 别名:上次移动5分钟后关闭楼梯灯

您的凹痕无处不在。这在YAML中非常重要。选择一个标准(2个空间很常见)并坚持下去。

例如这:

触发器:平台:state entity_id:binary_sensor.wyzesense_779e9d08 to:'on on'

应该:

触发器:平台:state entity_id:binary_sensor.wyzesense_779e9d08 to:'on on'

这:

操作:服务:light.turn_off entity_id:-light.stairs_1

应该:

操作:服务:light.turn_off entity_id:-light.stairs_1 ...等

您也可能有一个奇特的报价‘’’而不是在某个地方''或者这可能只是由于您的副本/粘贴。首先解决所有凹痕问题。

真的很困惑。我通过Atom的YAML编辑器运行它,并且一切似乎都排成一行,而且我不再遇到配置错误,但是运动探测器仍未触发灯光。

配置yaml:

# Configure a default setup of 19463331伟德国际Home Assistant (frontend, api, etc) default_config: # Text to speech tts: - platform: google_translate group: !include groups.yaml automation: !include automations.yaml script: !include scripts.yaml scene:!include scenes.yaml # Example configuration.yaml entry light: - platform: flux_led automatic_add: true devices: 192.168.2.175: name: "Stairs 1" mode: "rgbw" protocol: 'ledenet' 192.168.2.227: name: "Stairs2“模式:“ RGBW”协议:'Ledenet'192.168.2.95:名称:“卧室1”模式:“ RGBW”协议:'Ledenet'192.168.2.108:name:name:“ beger 2”模式:“ rgbbw”协议:'rgbw“协议:''Ledenet'192.168.2.25:名称:“ trand_door_bulb”模式:“ RGBW”协议:'Ledenet'192.168.2.198:名称:“地下室灯泡1”模式:“ RGBW”协议:“灯泡2“模式:“ RGBW”协议:'Ledenet'192.168.2.128:名称:“客厅灯”模式:“ RGBW”协议:'Ledenet'192.168.2.136:name:“ entryway Bulb”模式:“ RGBW”协议:“ RGBW”协议:'Ledenet'192.168.2.146:名称:“饭厅灯泡“模式:“ RGBW”协议:'Ledenet'192.168.2.181:名称:“露台灯泡”模式:“ RGBW”协议:'Ledenet'192.168.2.206:name:“ bon Desk Bulb”模式:“ RGBW”协议:“ RGBW”协议:“ RGBW”协议:“ RGBW”'Ledenet'192.168.2.209:名称:“餐厅灯”模式:“ RGBW”协议:'Ledenet'192.168.2.228:名称:“ Living Room 1”模式:“ RGBW”协议:'Ledenet'192.168.2.216:名称:名称:名称::“客厅2”模式:“ RGBW”协议:'Ledenet'192.168.2.179:名称:“后院灯泡”模式:“ RGBW”协议:'Ledenet'192.168.2.252:名称:名称:“浴室天花板”模式:“ RGBW“协议:'Ledenet'192.168.2.222:名称:“浴室接收器1”模式:“ RGBW”协议:'Ledenet'192.168.2.214:名称:“浴室水槽2”模式:“ RGBW”协议:“ RGBW”协议:'Ledenet'192.168。2.148:姓名:“浴室接收器3”模式:“ RGBW”协议:'Ledenet'192.168.2.79:名称:“ Office Bulb 1”模式:“ RGBW”协议:'Ledenet'192.168.2.207:name:name:“ name:” Office Bulb 2“模式:“ RGBW”协议:'Ledenet'192.168.2.184:名称:“烧烤灯”模式:“ RGBW”协议:'Ledenet'192.168.2.8:name:name:“ Rec Room 1”模式:“ RGBBW”协议:'Ledenet'192.168.2.160:名称:“ REC ROOM 2”模式:“ RGBW”协议:'Ledenet'192.168.2.31:名称:“ REC ROOM 3”模式:“ RGBW”协议:“ RGBW”协议:'Ledenet'192.168.2.1022:名称:“ REC ROOM 4”模式:“ RGBW”协议:'Ledenet'192.168.2.190:名称:“走廊灯泡”模式:“ RGBW”协议:'Ledenet'Ledenet'Binary_sensor: - 平台: -  Wyzesense:Wyzesense设备:自动自动化: - 自动化: - alias: Turn on stairs lights with motion detection trigger: platform: state entity_id: binary_sensor.wyzesense_779e9d08 to: 'on' action: service: light.turn_on entity_id: - light.stairs_1 - light.stairs_2 - light.basement_bulb_1 - light.basement_bulb_2 - alias: Turn off Stairs lights 5 minutes after last movement trigger: platform: state entity_id: binary_sensor.wyzesense_779e9d08 to: 'off' for: minutes: 5 action: service: light.turn_off entity_id: - light.stairs_1 - light.stairs_2 - light.basement_bulb_1 - light.basement_bulb_2

仍然有很多压痕错误。在这里,尝试以下操作:

# Configure a default setup of 19463331伟德国际Home Assistant (frontend, api, etc) default_config: # Text to speech tts: - platform: google_translate group: !include groups.yaml automation: !include automations.yaml script: !include scripts.yaml scene:!include scenes.yaml # Example configuration.yaml entry light: - platform: flux_led automatic_add: true devices: 192.168.2.175: name: "Stairs 1" mode: "rgbw" protocol: 'ledenet' 192.168.2.227: name: "Stairs2“模式:“ RGBW”协议:'Ledenet'192.168.2.95:名称:“卧室1”模式:“ RGBW”协议:'Ledenet'192.168.2.108:name:name:“ beger 2”模式:“ rgbbw”协议:'rgbw“协议:''Ledenet'192.168.2.25:名称:“ trand_door_bulb”模式:“ RGBW”协议:'Ledenet'192.168.2.198:名称:“地下室灯泡1”模式:“ RGBW”协议:“灯泡2“模式:“ RGBW”协议:'Ledenet'192.168.2.128:名称:“客厅灯”模式:“ RGBW”协议:'Ledenet'192.168.2.136:name:“ entryway Bulb”模式:“ RGBW”协议:“ RGBW”协议:'Ledenet'192.168.2.146:名称:“饭厅灯泡“模式:“ RGBW”协议:'Ledenet'192.168.2.181:名称:“露台灯泡”模式:“ RGBW”协议:'Ledenet'192.168.2.206:name:“ bon Desk Bulb”模式:“ RGBW”协议:“ RGBW”协议:“ RGBW”协议:“ RGBW”'Ledenet'192.168.2.209:名称:“餐厅灯”模式:“ RGBW”协议:'Ledenet'192.168.2.228:名称:“ Living Room 1”模式:“ RGBW”协议:'Ledenet'192.168.2.216:名称:名称:名称::“客厅2”模式:“ RGBW”协议:'Ledenet'192.168.2.179:名称:“后院灯泡”模式:“ RGBW”协议:'Ledenet'192.168.2.252:名称:名称:“浴室天花板”模式:“ RGBW“协议:'Ledenet'192.168.2.222:名称:“浴室接收器1”模式:“ RGBW”协议:'Ledenet'192.168.2.214:名称:“浴室水槽2”模式:“ RGBW”协议:“ RGBW”协议:'Ledenet'192.168。2.148:姓名:“浴室接收器3”模式:“ RGBW”协议:'Ledenet'192.168.2.79:名称:“ Office Bulb 1”模式:“ RGBW”协议:'Ledenet'192.168.2.207:name:name:“ name:” Office Bulb 2“模式:“ RGBW”协议:'Ledenet'192.168.2.184:名称:“烧烤灯”模式:“ RGBW”协议:'Ledenet'192.168.2.8:name:name:“ Rec Room 1”模式:“ RGBBW”协议:'Ledenet'192.168.2.160:名称:“ REC ROOM 2”模式:“ RGBW”协议:'Ledenet'192.168.2.31:名称:“ REC ROOM 3”模式:“ RGBW”协议:“ RGBW”协议:'Ledenet'192.168.2.1022:名称:“ REC ROOM 4”模式:“ RGBW”协议:'Ledenet'192.168.2.190:名称:“走廊灯泡”模式:“ RGBW”协议:'Ledenet'Ledenet'Binary_sensor: - 平台: -  Wyzesense:Wyzesense设备:自动自动化: - 自动化: - alias: Turn on stairs lights with motion detection trigger: platform: state entity_id: binary_sensor.wyzesense_779e9d08 to: 'on' action: service: light.turn_on entity_id: - light.stairs_1 - light.stairs_2 - light.basement_bulb_1 - light.basement_bulb_2 - alias: Turn off Stairs lights 5 minutes after last movement trigger: platform: state entity_id: binary_sensor.wyzesense_779e9d08 to: 'off' for: minutes: 5 action: service: light.turn_off entity_id: - light.stairs_1 - light.stairs_2 - light.basement_bulb_1 - light.basement_bulb_2

好的。我尝试了您的配置,并且似乎在“历史记录”选项卡中工作,但是灯实际上并没有打开它们。

而且,当我尝试在乡亲敏感的情况下手动打开它们时,它们在启用时无能为力,并且在禁用时会迅速闪烁。

然后,您的flux_led设置似乎存在问题。我对抱歉一无所知。

先获取灯光,然后手动工作,然后再次尝试自动化。