al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
4.72k stars 668 forks source link

请求支持领普 s2 开关的自带传感器 #1890

Open hainru opened 1 month ago

hainru commented 1 month ago

Device model / 设备型号

linp.switch.s2dw3

Component version / 插件版本

0.7.20

HA core version / HA版本

No response

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

请求支持领普 s2 开关的传感器组件,该开关可以在实体面板上自定义显示任意文字,非常有用!但目前的版本不支持该设备的传感器,只能控制其实体开关,希望考虑兼容更新,谢谢! IMG_9586

Entity attributes / 实体属性

model: linp.switch.s2dw3
lan_ip: 192.168.66.110
mac_address: 8C:D0:B2:3F:76:26
entity_class: MiotSwitchEntity
home_room: 珊瑚湾 主卧
miot_type: urn:miot-spec-v2:device:switch:0000A003:linp-s2dw3:2:0000D042
switch-3.on: false
switch-3.mode: 1
vd_panel_a.text_a: 欢迎来到主卧!
vd_panel_a.text_b: 南面室外温度28.2°C\n东面室外温度26.4°C\n 客厅当前温度29.3℃
vd_panel_a.text_c: 主卧当前温度29°C\n次卧当前温度28.5°C\n厨房当前温度28.6°C
vd_panel_a.text_s: 你好!
vd_motor_b.target_position: 50
vd_motor_a.target_position: 50
vd_thmst_b.on: false
vd_thmst_b.target_temperature: 25
vd_thmst_b.mode: 0
vd_thmst_b.fan_level: 0
vd_thmst_a.on: false
vd_thmst_a.target_temperature: 27.5
vd_thmst_a.mode: 1
vd_thmst_a.fan_level: 0
vd_light_c.on: false
vd_light_c.brightness: 50
vd_light_c.color_temperature: 4000
vd_light_c.color: 16777215
vd_light_c.color_mode: 0
vd_light_b.on: false
vd_light_b.brightness: 50
vd_light_b.color_temperature: 4000
vd_light_a.on: false
vd_light_a.brightness: 50
vd_light_a.color_temperature: 4000
vendor.city: "101310101"
vendor.screen_saver: true
vendor.night_mode: true
vendor.night_mode_start: 75600
vendor.night_mode_over: 32400
vendor.sensitivity: 2
vendor.occupy: false
vendor.relay_lock: false
vendor.access_token: ""
vendor.refresh_token: ""
vendor.time_fmt: 0
vendor.ss_brightness: 20
vendor.rotate: false
screen_set.screen_a: "0"
screen_set.screen_b: 73,1,空调|主卧,1
screen_set.screen_c: 75,1,信息中心|通知,1
screen_set.screen_d: >-
  5,(5,12,67,0),(1,0,28,0),(2,0,0,0),(3,0,28,0),(4,0,0,2),(0,0,0,0),(0,0,0,0),(0,0,0,0)
screen_set.screen_e: ""
screen_set.screen_f: ""
screen_set.theme: https://s2dw.ks3-cn-shanghai.ksyuncs.com/v1/hy/theme.bin
screen_set.names: 开窗帘,开窗,关窗帘,关窗,空调开关,,,,,,,,,,,,
screen_set.theme_cfg: 10,291,10,266,3,15,10,234,3,164,0,0,0,0,15
screen_set.scene_a: ""
screen_set.scene_b: ""
screen_set.screen_g: ""
screen_set.screen_h: ""
screen_set.screen_ss: ""
screen.brightness: 28
screen.auto_screen_off: true
screen.auto_screen_brightness: true
screen.auto_screen_off_time: 1
screen.on: true
state_updater: lan
device_class: switch
friendly_name: Linptech Touch Screen Switch S2 Second Switch Service
supported_features: 0

Home Assistant Logs / 系统日志

No response

hainru commented 1 month ago

该开关在小米中枢网关(极客版)中支持的功能有这些,供参考!通过其虚拟文本功能可以实现面板文字自定义,非常有用 IMG_9587

al-one commented 1 month ago

尝试master分支

mickey50 commented 1 month ago

尝试master分支

目前已经支持虚拟灯具的服务了,能把里面的虚拟温控器面板也支持一下么?这样就可以实现一个HA的温控面板了,谢谢!

rayout commented 3 weeks ago

The click events on the physical buttons do not register when they are switched to wireless mode. Is it possible to set it up so that I can control the button presses in wireless mode through Home Assistant?

al-one commented 3 weeks ago

@rayout Not supported for the now.