找回密码
 立即注册
查看: 5745|回复: 0

esphome总射频码可以指定多个码对应一个二进制传感器麽

[复制链接]

35

主题

118

回帖

1078

积分

金牌会员

积分
1078
金钱
925
HASS币
10
发表于 2020-3-6 15:14:00 | 显示全部楼层 |阅读模式
有时候可能有多个射频码来同时控制一个继电器。单一控制是如下方法:
- platform: remote_receiver
   name: "客厅_沙发边_玄关"
   internal: true
   filters:
     - delayed_off: 100ms
   rc_switch_raw:
     code: '001101100100011000000100'
     protocol: 1
   on_press:
     then:
       - switch.toggle: CH_3


但是如果code过多。会导致重复输入这段代码name也不统一了。能否包含多个code?
比如:
- platform: remote_receiver
   name: "客厅_沙发边_玄关"
   internal: true
   filters:
     - delayed_off: 100ms
   rc_switch_raw:
     code: '001101100100011000000100'
     code: '001101100100011000000100'
     code: '001101100100011000000100'
     protocol: 1
   on_press:
     then:
       - switch.toggle: CH_3




回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )

GMT+8, 2025-5-10 19:30 , Processed in 0.069722 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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