智趣盒子如何添加涂鸦zigebee开关到home Asistant ,已经接入zigbee2mqtt

涂鸦zigebee开关 已经接入zigbee2mqtt ,可以在里面控制开关。看图

但在是HA里面 已经看到两个实体,也能添加。但就是控制不了,看图


tuya3_20210325154802

我也按说明在 configration.yaml里加了代码 参考这里 https://www.zigbee2mqtt.io/devices/TS0012.html#tuya-ts0012

switch:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_off: "OFF"
    payload_on: "ON"
    value_template: "{{ value_json.state_left }}"
    command_topic: "zigbee2mqtt/<FRIENDLY_NAME>/left/set"

switch:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_off: "OFF"
    payload_on: "ON"
    value_template: "{{ value_json.state_right }}"
    command_topic: "zigbee2mqtt/<FRIENDLY_NAME>/right/set"

sensor:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    value_template: "{{ value_json.linkquality }}"
    unit_of_measurement: "lqi"
    icon: "mdi:signal"

请问是什么回事??

不知道什么回事。 真的像大神讲的。 有问题。要重启机器 再试。我可能 重启了盒子。又加入了小米zigbee人体感应器后就见到两个开关了。。。。。 :joy: