mjg59 / python-broadlink

Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs
MIT License
1.35k stars 477 forks source link

Add support for Luceco/BG Electrical Smart Bulb (0x606d) #766

Closed ghost closed 2 months ago

ghost commented 11 months ago

Context

The Luceco Smart Bulbs https://www.bg-home.uk/a60-globe appear to be white labelled Broadlink bulbs. Adding the ID makes them recognisable and controllable from this library.

The product's catalogue numbers: SLA22RGB9W81 or SLA27RGB9W81, are printed on the side of the device along with the Luceco brand. The bulbs are normally controlled by the BG-Home app and need to be removed from the app to be unlocked.

Proposed change

Add product ID for compatible bulb.

Type of change

Additional information

Adding the ID to the LB1 supported types gives access to this device. The following works as expected:

import broadlink
broadlink.discover()
device = broadlink.hello('192.168.0.56')
device.auth()
device.get_state()

device.set_state(pwr=0)
device.set_state(pwr=1)
device.set_state(bulb_colormode=0, red=255, green=0, blue=0, brightness=255)
device.set_state(bulb_colormode=1,brightness=255, colortemp=2700)
device.set_state(bulb_colormode=1,brightness=255, colortemp=6500)

No updates to documentation, this appears to be just another white label ID rather than a new device.

Checklist

ghost commented 10 months ago

Merging github accounts and moving repositories: webturneruk -> webturner.

webturner commented 10 months ago

I've deleted a duplicate account, please contact me if necessary regarding this PR.

felipediel commented 2 months ago

Awesome, thanks @webturner!