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

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

[已解决] sonoff ch4 怎么改都不行。

[复制链接]

7

主题

155

帖子

657

积分

高级会员

Rank: 4

积分
657
金钱
501
HASS币
0
发表于 2017-11-20 14:02:27 | 显示全部楼层 |阅读模式
本帖最后由 yukinghong 于 2017-12-2 12:23 编辑

搞定了只加了下面这个MQTT,不需要加SWITCH。可是变成light的项目了。不知道怎么搞的,谁知道啊!》
mqtt:
  broker: 127.0.0.1
  port: 1883
  client_id: home-assistant-1
  keepalive: 60
  username: pi
  password: raspberry
  protocol: 3.1.1
#sonoff CH4
switch:
  - platform: mqtt
    name: "SONOFF 4CH开关1"
    state_topic: "stat/ch4/POWER1"
    command_topic: "cmnd/ch4/POWER1"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
  - platform: mqtt
    name: "SONOFF 4CH开关2"
    state_topic: "stat/ch4/POWER2"
    command_topic: "cmnd/ch4/POWER2"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
  - platform: mqtt
    name: "SONOFF 4CH开关3"
    state_topic: "stat/ch4/POWER3"
    command_topic: "cmnd/ch4/POWER3"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
  - platform: mqtt
    name: "SONOFF 4CH开关4"
    state_topic: "stat/ch4/POWER4"
    command_topic: "cmnd/ch4/POWER4"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true



01.png
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-23 02:43 , Processed in 0.112469 second(s), 26 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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