找回密码
 立即注册

微信扫码登录

搜索
查看: 58|回复: 1

[技术探讨] 关于一个米家 八健 旋钮 开关的问题!!!

[复制链接]

75

主题

523

回帖

2491

积分

金牌会员

积分
2491
金钱
1893
HASS币
50
发表于 4 小时前 | 显示全部楼层 |阅读模式
八健 旋钮 开关 蓝牙协议 已经顺利接入米家app。但是接入ha后功能不全。这个怎么搞!!!



gateway3状态

gateway3状态

xiaomi home状态

xiaomi home状态

molt zhuangt

molt zhuangt


三种方法 功能都不全!!!


\config\custom_components\xiaomi_gateway3\core下的

devices.py 这个文件 我也添加了 。但是也没有功能 !!!各位是怎么处理的!!!





    17825: [None, "Eight scene knob switch", "cxw.remote.ble006"],
    "spec": [
        BaseConv("battery", mi="7.p.1003"),  # uint8
        BaseConv("action", "sensor"),
        MapConv("action", mi="5.e.1012.p.1", map={1: BUTTON_1_SINGLE, 2: BUTTON_2_SINGLE, 3: BUTTON_3_SINGLE, 4: BUTTON_4_SINGLE, 5: "button_5_single", 6: "button_6_single", 7: "button_7_single", 8: "button_8_single"}),
        MapConv("action", mi="5.e.1013.p.1", map={1: BUTTON_1_DOUBLE, 2: BUTTON_2_DOUBLE, 3: BUTTON_3_DOUBLE, 4: BUTTON_4_DOUBLE, 5: "button_5_double", 6: "button_6_double", 7: "button_7_double", 8: "button_8_double"}),
        MapConv("action", mi="5.e.1014.p.1", map={1: BUTTON_1_HOLD, 2: BUTTON_2_HOLD, 3: BUTTON_3_HOLD, 4: BUTTON_4_HOLD, 5: "button_5_hold", 6: "button_6_hold", 7: "button_7_hold", 8: "button_8_hold"}),
        ConstConv("action", mi="5.e.1036", value="rotate"),
        BaseConv("rotate", mi="5.e.1036.p.2"),
    ],
    # "ttl": "6h"  # battery every 6 hours
}, {
    # https://home.miot-spec.com/spec/ailol.remote.ts4

接入米家

接入米家

米家状态

米家状态
回复

使用道具 举报

17

主题

350

回帖

1811

积分

金牌会员

积分
1811
金钱
1434
HASS币
40
发表于 3 小时前 | 显示全部楼层
本帖最后由 lovelyelfpop 于 2026-1-20 17:38 编辑

我的和你一样,我用的xiaomi home 集成接入的,监听事件,判断事件里面的数据

alias: 八键旋钮开关按键
description: ""
triggers:
  - entity_id:
      - event.cxw_cn_blt_3_1nimie2584k02_ble006_click_e_5_1012
    trigger: state
    not_from: unavailable
    not_to: unavailable
conditions: []
actions:
  - data:
      message: |
        双击事件触发
        实体:{{ trigger.entity_id }}
        旧状态值:{{ trigger.from_state.state }}
        新状态值:{{ trigger.to_state.state }}
        整个新状态对象:
        {{ trigger.to_state.as_dict() | tojson(indent=2) }}
    action: notify.wework
  - alias: "1"
    if:
      - alias: 判断是否按键1
        condition: template
        value_template: "{{ trigger.to_state.attributes['情景按键'] == 1 }}"
        enabled: true
    then:
      - action: notify.wework
        message: '按了1'
  - if:
      - alias: 判断是否按键2
        condition: template
        value_template: "{{ trigger.to_state.attributes['情景按键'] == 2 }}"
        enabled: true
    then:
      - action: notify.wework
        message: '按了2'
    alias: "2"
mode: single
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-20 21:25 , Processed in 0.058326 second(s), 6 queries , MemCached On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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