跳转至

红外遥控-小米万能遥控器

硬件准备

  • 小米万能遥控器

操作步骤

  1. 安装miio,获得小米万能遥控器的token
  2. 接入小米万能遥控器设备
  3. 学习红外码
  4. 配置对应命令与脚本

参考

  • 小米万能遥控器组件

https://www.home-assistant.io/integrations/xiaomi_miio#xiaomi-ir-remote

视频中演示的配置样例

# example_7_4_1.yaml remote: - platform: xiaomi_miio name: xiaomi_rm host: x.x.x.x token: xxxxxxxxxxxxxxxxxx commands: tv_power: command: - raw:xxxxxxxxxxxxxxxxxxxxxxxx tv_input: command: raw:xxxxxxxxxxxxxxxxxx script: tv_power: alias: 电视开关 sequence: - service: remote.send_command entity_id: 'remote.xiaomi_rm' data: command: 'tv_power' tv_input: alias: 输入源切换 sequence: - service: remote.send_command entity_id: 'remote.xiaomi_rm' data: command: - 'tv_input'

返回课程目录↩