python-yeelightbt icon indicating copy to clipboard operation
python-yeelightbt copied to clipboard

Workaround for Home Assistant

Open alexvenom opened this issue 4 years ago • 1 comments

As the custom_component for Home Assistant seems not to be working, I came up with this workaround for using the Candelas. It is slow and far from perfect, but it works.

1- Install python-yeelightbt using SSH in port 22222 (as described in the Installation section of the documentation) or using Portainer to access the shell.

2- Still in the SSH or Portainer shell, configure your lights: 2.1- make sure your Candela is turned ON (light up) and near 2.2- use yeelightbt scan to list your devices 2.3- try to connect to each Candela using this command yeelightbt --mac:the_mac_of_your_candela on 2.4- it will ask you to change the brightness. CHANGE THE BRIGHTNESS turning the light glass. If you don't, the link will work for a while and stop working later. If you don't see a "we are linked" message, it did not work. Try again. 2.5- repeat 2.3 and 2.4 for every Candela you have.

3- Create multiple command switches in your configuration to operate the Candelas:

switch:
  platform: command_line
  switches:
    candela_1:
      command_on: '/usr/local/bin/yeelightbt --mac=f8:24:41:XX:YY:ZZ on'
      command_off: '/usr/local/bin/yeelightbt --mac=f8:24:41:XX:YY:ZZ off'
      friendly_name: Candela Living Room
    candela_2:
      command_on: '/usr/local/bin/yeelightbt --mac=f8:24:41:XX:YY:KK on'
      command_off: '/usr/local/bin/yeelightbt --mac=f8:24:41:XX:YY:KK off'
      friendly_name: Candela Bedroom
    candela_3:
      command_on: '/usr/local/bin/yeelightbt --mac=f8:24:41:XX:YY:PP on'
      command_off: '/usr/local/bin/yeelightbt --mac=f8:24:41:XX:YY:PP off'
      friendly_name: Candela TV room

Use those switches to turn on/off your candelas. You can also set brightness to turn it on at a specified brightness setting, so, if the Candela is turned off, running '/usr/local/bin/yeelightbt --mac=f8:24:41:XX:YY:ZZ brightness 100' will turn it on at 100%.

alexvenom avatar Apr 10 '20 12:04 alexvenom

Hi, I was made scripts for this. https://github.com/djjproject/yeelightbt_script

djjproject avatar Dec 06 '20 05:12 djjproject