Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以将小爱同学Pro添加的 红外设备添加吗? #116

Closed
weiyideai520 opened this issue Jun 28, 2021 · 9 comments
Closed

可以将小爱同学Pro添加的 红外设备添加吗? #116

weiyideai520 opened this issue Jun 28, 2021 · 9 comments

Comments

@weiyideai520
Copy link

我家里有一些红外设备,是通过小爱同学Pro添加的。

这些设备可以被识别并添加吗?

@al-one
Copy link
Owner

al-one commented Jun 28, 2021

暂时不支持红外虚拟设备,但是可以通过小爱执行语音命令控制红外设备。对于有些小爱不支持的按键,可以在米家添加手动场景并开始小爱控制。

service: xiaomi_miot.intelligent_speaker
data:
  entity_id: media_player.xiaoai_entity_id
  text: 打开电视
  execute: true
  silent: true

@weiyideai520
Copy link
Author

好的吧,我还想成要是能添加的话,那 homekit 就可以直接显示了

@al-one
Copy link
Owner

al-one commented Jun 28, 2021

主要是红外设备无法获取状态,想在Homekit显示可以使用template switch等。

@weiyideai520
Copy link
Author

暂时不支持红外虚拟设备,但是可以通过小爱执行语音命令控制红外设备。对于有些小爱不支持的按键,可以在米家添加手动场景并开始小爱控制。

service: xiaomi_miot.intelligent_speaker
data:
  entity_id: media_player.xiaoai_entity_id
  text: 打开电视
  execute: true
  silent: true

我想请教一下
我要添加一个窗帘(cover)
目前可以直接通过小爱同学说:“打开窗帘”,“关闭窗帘”,“暂停窗帘”,进行控制。
那么我要转换成 hass 上设备(能被homekit识别),我应该怎么设置?

有没有类似的案列模板呀?我学习一下

@al-one al-one reopened this Jun 28, 2021
@al-one
Copy link
Owner

al-one commented Jun 28, 2021

# configuration.yaml
cover:
  - platform: template
    # https://www.home-assistant.io/integrations/cover.template
    covers:
      xiaoai_ir_curtain:
        device_class: curtain
        friendly_name: 窗帘
        optimistic: true # https://www.home-assistant.io/integrations/cover.template/#optimistic
        open_cover:
          service: xiaomi_miot.intelligent_speaker
          data:
            entity_id: media_player.xiaoai_entity_id
            text: 打开窗帘
            execute: true
            silent: true
        close_cover:
          service: xiaomi_miot.intelligent_speaker
          data:
            entity_id: media_player.xiaoai_entity_id
            text: 关闭窗帘
            execute: true
            silent: true
        stop_cover:
          service: xiaomi_miot.intelligent_speaker
          data:
            entity_id: media_player.xiaoai_entity_id
            text: 暂停窗帘
            execute: true
            silent: true

@weiyideai520
Copy link
Author

# configuration.yaml
cover:
  - platform: template
    # https://www.home-assistant.io/integrations/cover.template
    covers:
      xiaoai_ir_curtain:
        device_class: curtain
        friendly_name: 窗帘
        optimistic: true # https://www.home-assistant.io/integrations/cover.template/#optimistic
        open_cover:
          service: xiaomi_miot.intelligent_speaker
          data:
            entity_id: media_player.xiaoai_entity_id
            text: 打开窗帘
            execute: true
            silent: true
        close_cover:
          service: xiaomi_miot.intelligent_speaker
          data:
            entity_id: media_player.xiaoai_entity_id
            text: 关闭窗帘
            execute: true
            silent: true
        stop_cover:
          service: xiaomi_miot.intelligent_speaker
          data:
            entity_id: media_player.xiaoai_entity_id
            text: 暂停窗帘
            execute: true
            silent: true

非常感谢了,我这就记录下来。

@weiyideai520
Copy link
Author

不愧是大神,真的能用,牛逼

@al-one
Copy link
Owner

al-one commented Jun 28, 2021

😂 能用就好。

@65698888
Copy link

65698888 commented Apr 6, 2022

求教,请问如何关闭状态反馈?assumed_state 无法使用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants