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

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

[基础教程] 求助,配置conversation,如何添加多个设备的语音控制

[复制链接]

12

主题

268

帖子

1351

积分

金牌会员

Rank: 6Rank: 6

积分
1351
金钱
1083
HASS币
4
发表于 2018-8-17 20:05:13 | 显示全部楼层 |阅读模式
本帖最后由 lb121700 于 2018-8-17 20:51 编辑

在论坛朋友热心的帮助下,成功的配置SSL,折腾conversation,尝试多次添加多个设备始终设备,求正确格式。谢谢!单个设备能够正常使用语音控制:
conversation:
  intents:
    OpenLight:
      - 打开{item}灯
      - 把{item}灯打开
    CloseLight:
      - 关上{item}灯
      - 关闭{item}灯
      - 关了{item}灯

intent_script:  
  OpenLight:
    speech:
      text: 已打开{{ item }}灯
    action:
      service: light.turn_on
      data_template:
        entity_id: >
          {% if item=="餐厅" %}
            light.001
          {% endif %}   

  CloseLight:     
    speech:
      text: 已关闭{{ item }}灯
    action:
      service: light.turn_off
      data_template:
        entity_id: >
          {% if item=="餐厅" %}
            light.001
          {% endif %}

多个设备就不正常了:

conversation:
  intents:
    OpenLight:
      - 打开{item}灯
      - 把{item}灯打开
    CloseLight:
      - 关上{item}灯
      - 关闭{item}灯
      - 关了{item}灯

intent_script:  
  OpenLight:
    speech:
      text: 已打开{{ item }}灯
    action:
      service: light.turn_on
      data_template:
        entity_id: >
          {% if item=="餐厅" %}
            light.001
          {% endif %}   
  OpenLight:
    speech:
      text: 已打开{{ item }}灯
    action:
      service: light.turn_on
      data_template:
        entity_id: >
          {% if item=="客厅" %}
            light.002
          {% endif %}            

  CloseLight:     
    speech:
      text: 已关闭{{ item }}灯
    action:
      service: light.turn_off
      data_template:
        entity_id: >
          {% if item=="餐厅" %}
            light.001
          {% endif %}
  CloseLight:     
    speech:
      text: 已关闭{{ item }}灯
    action:
      service: light.turn_off
      data_template:
        entity_id: >
          {% if item=="客厅" %}
            light.002
          {% endif %}         


求正确配置格式,谢谢大神

回复

使用道具 举报

1

主题

164

帖子

1103

积分

金牌会员

Rank: 6Rank: 6

积分
1103
金钱
939
HASS币
0
发表于 2018-8-18 08:46:38 | 显示全部楼层
chrome的语音识别要翻越gfw吗
嗯哼,有论坛签名了
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-6 01:39 , Processed in 0.085266 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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