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.64k stars 664 forks source link

add ambient light effect? #997

Open konistra opened 1 year ago

konistra commented 1 year ago

There are effects in the official yeelight integration

effect_list: Strobe color, Police, Christmas, RGB, Random Loop, Fast Random Loop, LSD, Slowdown, Night Mode, Date Night, Movie, Sunrise, Sunset, Romance, Happy Birthday, Disco, Strobe epilepsy!, Alarm, Police2, WhatsApp, Facebook, Twitter, Home, Candle Flicker, Slow Temp, Stop

is it possible to transfer or add your own to the Xiaomi Miot integration?

effect_list: RGB, HSV

do they not work.

Light https://home.miot-spec.com/spec/yeelink.light.ceilb

al-one commented 1 year ago

Try this service:

service: xiaomi_miot.send_command
data:
  entity_id: light.yeelink_ceilb_xxxx
  method: start_cf
  params:
    - 0 # count: The number of times to run this flow (0 to run forever)
    - 1 # action: The action to take after the flow stops. Can be `0` to go back to the state before the flow, `1` to stay at the last state, and `2` to turn off
    - 1996, 1, 14438425, 80, 1996, 1, 14448670, 80, 1996, 1, 11153940, 80 # transitions: happy_birthday
  throw: true
al-one commented 1 year ago

Does it work ?

konistra commented 1 year ago

Does it work ?

yes it works, but I need to add these effects to effect_list: is it possible to do this?

buildergergely commented 1 year ago
xiaomi_miot.send_command

This is great! Can you please share how can we find the valueset for the 3rd param? Are there pre-set transition values available somewhere to get the default effects? thanks

buildergergely commented 1 year ago
xiaomi_miot.send_command

This is great! Can you please share how can we find the valueset for the 3rd param? Are there pre-set transition values available somewhere to get the default effects? thanks

Found this: https://github.com/revil-O/Yeelight-Bulb-scenes

al-one commented 1 year ago

https://gitlab.com/stavros/python-yeelight/-/blob/master/yeelight/flows.py