2024年11月22日星期五 上午3:26:59

米家床头灯2 如何设置夜灯模式moonlight mode nightlight mode

1 年 前
#22723 引用
米家床头灯2 如何设置夜灯模式

https://bbs.hassbian.com/thread-15018-1-1.html

https://community.home-assistant.io/t/xiaomi-yeelight-bedside-lamp-color-state/71617/13


you must have yeelink.light.bslamp2 with xiaomi brand.
with xiaomi miot auto integration


米家床头灯2, 更新过一次固件, 就不支持yeelight的局域网模式控制了, 没法用HA 的yeelight插件控制.但是可以用miot协议, 借助miot 插件实现色彩, 色温, 亮度的控制.

但是, 这个床头灯有一个夜灯模式, 可以在米家app和yeelight app上开启, 开启后, 会有一个非常低的亮度.
这个亮度是不可以通过常规的亮度(1-100)来实现的
0
1 年 前
#22724 引用

已解决


service: xiaomi_miot.send_command
data:
  entity_id: light.yeelink_bslamp2_entity_id
  method: set_ps
  params:
    - nightlight
    - 'on


https://github.com/al-one/hass-xiaomi-miot/issues/301
0
1 年 前
#22725 引用
You can find set_ps in this js file.
https://github.com/al-one/hass-xiaomi-miot/files/7922104/yeelink.light.bslamp2.js.txt



return _callMiSDKMethod("set_ps", ["pseudo_beacon", "4097|" + keyValue], callback);
return _callMiSDKMethod("set_ps", ["cfg_save_state", s], callback);
return _callMiSDKMethod("set_ps", ["cfg_kid_lock", s], callback);
return _callMiSDKMethod("set_ps", ["cfg_bg_proact", s], callback);
return _callMiSDKMethod("set_ps", ["cfg_pomodoro", string], callback);
return _callMiSDKMethod("set_ps", ["cfg_pomodoro", "00"], callback);
return _callMiSDKMethod("set_ps", ["cfg_pomodoro", string], callback);
return _callMiSDKMethod("set_ps", ["cfg_kidmode", param], callback);
return _callMiSDKMethod("set_ps", ["cfg_shortkey", string], callback);
return _callMiSDKMethod("set_ps", ["nightlight", state], callback);
return _callMiSDKMethod("set_ps", ["nightlight", state], callback);
return _callMiSDKMethod("set_ps", ["nighttime", nightlightString], callback);
return _callMiSDKMethod("set_ps", ["nighttime", enableStr], callback);
return _callMiSDKMethod("set_ps", ["cfg_smart_switch", enableStr], callback);
return _callMiSDKMethod("set_ps", ["miband_sleep", enabled ? "1" : "0"], callback);
return _callMiSDKMethod("set_ps", ["cfg_fast_scenes", state], callback);
return _callMiSDKMethod("set_ps", ["cfg_init_power", state], callback);
return _callMiSDKMethod('set_ps', ['sensor_pir', param], callback);
return _callMiSDKMethod('set_ps', ['sensor_pir_enable', param], callback);
return _callMiSDKMethod('set_ps', ['kid_mode', param], callback);
return _callMiSDKMethod('set_ps', ['cfg_ble_ctrl', param], callback);
return _callMiSDKMethod('set_ps', ['trans_default', param], callback);
return _callMiSDKMethod('set_ps', ['cfg_fast_scene_switch', param], callback);
return Api.callMiSDKMethod('set_ps', ['cfg_indicator', parameters.join(",")], callback);
return Api.callMiSDKMethod('set_ps', ['cfg_mode_data', values.join(",")], callback);
return Api.callMiSDKMethod('set_ps', ['cfg_mode_data', values.join(",")], callback);
return Api.callMiSDKMethod('set_ps', ['knock_enable', value], callback);

0
1 年 前
#22726 引用
米家吸顶灯 yeelink.light.ceil21 ha by alone's xiaomi miot auto integration

run ok




alias: Living room | A-turn on 21 moonlight mode nightlight mode
description: "http://localhost:4999/boards/topic/15751/%E7%B1%B3%E5%AE%B6%E5%BA%8A%E5%A4%B4%E7%81%AF2-%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AE%E5%A4%9C%E7%81%AF%E6%A8%A1%E5%BC%8Fmoonlight-mode-nightlight-mode"
trigger: []
condition: []
action:
  - service: xiaomi_miot.send_command
    data:
      entity_id: light.yeelink_ceiling21_5f74_light
      method: set_ps
      params:
        - nightlight
        - "on"
mode: single


0