本帖最后由 花蟋蟀 于 2018-12-1 20:17 编辑
前言:博联遥控 RM pro 接入
【简单粗暴】
homeassistant:
customize:
switch.broadlink_shebei1:
friendly_name: 设备1
icon: mdi:gas-cylinder
switch.broadlink_shebei2:
friendly_name: 设备2
icon: mdi:gas-cylinder
script.shebei3_button_power:
friendly_name: 设备3
icon: mdi:youtube
# assumed_state: false #false代码变成开关
script.shebei4_button_power:
friendly_name: 设备4
icon: mdi:youtube
# assumed_state: false #false代码变成开关
group:
broadlink: # “遥控”页 博联遥控
name: 博联遥控
view: no #在homeassistant的主页标签 是否显示
icon: mdi:star-circle #组图标
control: hidden #隐藏group组控制
entities:
- switch.broadlink_shebei1
- switch.broadlink_shebei2
- script.shebei3_button_power
- script.shebei4_button_power
switch:
- platform: broadlink
host: 192.168.1.0 #此处填写博联遥控的IP
mac: '填写博联遥控的MAC(带冒号)'
timeout: 15
switches:
# 设备1
broadlink_shebei1:
friendly_name: "shebei1"
command_on: '码'
command_off: '码'
#设备2
broadlink_shebei2:
friendly_name: "shebei2"
command_on: '码'
command_off: '码'
script:
# 设备3
shebei3_button_power:
sequence:
- service_template: >
switch.broadlink_send_packet_192_168_1_0 #此处博联遥控IP
data:
packet:
- "码"
# 设备4
shebei4_button_power:
sequence:
- service_template: >
switch.broadlink_send_packet_192_168_1_0 #此处博联遥控IP
data:
packet:
- "码"
可复制上面自己保存,可下载下面的直接放入packages文件夹下
附件的文件里缺少的部分,对照上面添加即可
主要修改了
group:
broadlink: # “遥控”页 博联遥控
name: 博联遥控
view: no #在homeassistant的主页标签 是否显示
icon: mdi:star-circle #组图标
control: hidden #隐藏group组控制
entities:
- switch.broadlink_shebei1
- switch.broadlink_shebei2
- script.shebei3_button_power
- script.shebei4_button_power
|