As Yeelight started getting unavailable lately until manual on/off, and when they were working they had disconnects issues
Using HomeKit integration gives less options and main disadvantage is I could not set maximum brightness
For local control as documented from official Yeelight:
Made shell commands to control, this for one light:
shell_command:
yeelight_off: echo -ne '{"id":1,"method":"set_power","params":["off"]}\r\n' | nc -w1 IP 55443
yeelight_high: echo -ne '{"id":1,"method":"set_power","params":["on"]}\r\n' | nc -w1 IP 55443 ; echo -ne '{"id":1,"method":"set_ct_abx","params":[4300]}\r\n' | nc -w1 IP 55443 ; echo -ne '{"id":1,"method":"set_bright","params":[100]}\r\n' | nc -w1 IP 55443
yeelight_low: echo -ne '{"id":1,"method":"set_power","params":["on"]}\r\n' | nc -w1 IP 55443 ; echo -ne '{"id":1,"method":"set_ct_abx","params":[2000]}\r\n' | nc -w1 IP 55443 ; echo -ne '{"id":1,"method":"set_bright","params":[1]}\r\n' | nc -w1 IP 55443
to control several got it to work only one after another:
shell_command:
yeelights_off: echo -ne '{"id":1,"method":"set_power","params":["off"]}\r\n' | nc -w1 IP1 55443 & echo -ne '{"id":1,"method":"set_power","params":["off"]}\r\n' | nc -w1 IP2 55443 &
yeelights_high: echo -ne '{"id":1,"method":"set_power","params":["on"]}\r\n' | nc -w1 IP1 55443 ; echo -ne '{"id":1,"method":"set_ct_abx","params":[4300]}\r\n' | nc -w1 IP1 55443 ; echo -ne '{"id":1,"method":"set_bright","params":[100]}\r\n' | nc -w1 IP1 55443 & echo -ne '{"id":1,"method":"set_power","params":["on"]}\r\n' | nc -w1 IP2 55443 ; echo -ne '{"id":1,"method":"set_ct_abx","params":[4300]}\r\n' | nc -w1 IP2 55443 ; echo -ne '{"id":1,"method":"set_bright","params":[100]}\r\n' | nc -w1 IP2 55443 &
yeelights_low: echo -ne '{"id":1,"method":"set_power","params":["on"]}\r\n' | nc -w1 IP1 55443 ; echo -ne '{"id":1,"method":"set_ct_abx","params":[2000]}\r\n' | nc -w1 IP1 55443 ; echo -ne '{"id":1,"method":"set_bright","params":[1]}\r\n' | nc -w1 IP1 55443 & echo -ne '{"id":1,"method":"set_power","params":["on"]}\r\n' | nc -w1 IP2 55443 ; echo -ne '{"id":1,"method":"set_ct_abx","params":[2000]}\r\n' | nc -w1 IP2 55443 ; echo -ne '{"id":1,"method":"set_bright","params":[1]}\r\n' | nc -w1 IP2 55443 &
While it’s inefficient and maybe slow, this way is working while lights unavailable in integration
If you know more efficient way to send commands please advise