找回密码
 立即注册
查看: 1449|回复: 1

[技术探讨] 更新ha后,关于mqtt配置怎么调整?

[复制链接]

14

主题

231

回帖

3582

积分

论坛元老

积分
3582
金钱
3337
HASS币
0
发表于 2024-3-29 10:15:26 | 显示全部楼层 |阅读模式
如题
以前好好地,后面重装了homeassistant后,原来配置没动过,提示mqtt配置错误

light:
  - platform: mqtt
    name: tongdeng
    state_topic: hassmart/switch/hassmart_2key_module_CD7D15_1/state
    command_topic: hassmart/switch/hassmart_2key_module_CD7D15_1/set
    qos: 1
    retain: false
  - platform: mqtt
    name: zhudeng
    state_topic: hassmart/switch/hassmart_2key_module_CD7D15_2/state
    command_topic: hassmart/switch/hassmart_2key_module_CD7D15_2/set
    qos: 1
    retain: false
  - platform: mqtt
    name: zhuweideng
    state_topic: hassmart/switch/hassmart_1key_module_CD29EA_1/state
    command_topic: hassmart/switch/hassmart_1key_module_CD29EA_1/set
    qos: 1
    retain: false


回复

使用道具 举报

14

主题

231

回帖

3582

积分

论坛元老

积分
3582
金钱
3337
HASS币
0
 楼主| 发表于 2024-3-29 13:23:46 | 显示全部楼层
本帖最后由 lff520520 于 2024-5-16 09:06 编辑

查询官网后修改对应文件即可
mqtt:
  - light:
      name: tongdeng
      state_topic: hassmart/switch/hassmart_2key_module_CD7D15_1/state
      command_topic: hassmart/switch/hassmart_2key_module_CD7D15_1/set
      qos: 1
      retain: false
  
      name: zhudeng
      state_topic: hassmart/switch/hassmart_2key_module_CD7D15_2/state
      command_topic: hassmart/switch/hassmart_2key_module_CD7D15_2/set
      qos: 1
      retain: false
  
      name: zhuweideng
      state_topic: hassmart/switch/hassmart_1key_module_CD29EA_1/state
      command_topic: hassmart/switch/hassmart_1key_module_CD29EA_1/set
      qos: 1
      retain: false


回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-15 01:39 , Processed in 0.274194 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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