Skip to content

StevenLooman/homeassistant-magicblue

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

homeassistant-magicblue

MagicBlue custom component for Home Assistant

MagicBlue is a $9.99 bluetooth LED bulb.

Requirement

Installation

Copy the magicbluelight.py file to :

<YOUR_CONFIG_DIR>/custom_component/light/magicbluelight.py

Configuration

First, make sure you can see your MagicBlue(s) by running:

$ magicblueshell
Magic Blue interactive shell v0.2.2
Type "help" for a list of available commands
> help
 ----------------------------
| List of available commands |
 ----------------------------
COMMAND         PARAMETERS                    DETAILS
-------         ----------                    -------
help                                          Show this help
list_devices                                  List Bluetooth LE devices in range
ls              //                            //
connect         mac_address or ID             Connect to light bulb
disconnect                                    Disconnect from current light bulb
set_color       name or hexadecimal value     Change bulb's color
set_warm_light  intensity[0.0-1.0]            Set warm light
turn            on|off                        Turn on / off the bulb
exit                                          Exit the script
> ls
Listing Bluetooth LE devices in range for 5 minutes.Press CTRL+C to stop searching.
ID    Name                           Mac address
--    ----                           -----------
1     LEDBLE-XXXXXXXX                xx:xx:xx:xx:xx:xx

Modify the following example and add it to your configuration.yaml file:

light:
  platform: magicbluelight
    name: 'Living Room'
    address: 20:16:01:01:05:a0
    version: 9

Multiple devices are supported:

light:
  - platform: magicbluelight
    name: 'Living Room'
    address: 20:16:01:01:05:a0
    version: 9
  - platform: magicbluelight
    name: 'Bedroom'
    address: 20:16:01:01:03:e5
    version: 9

Notes

  • Right now you'll have to manually install the required python module magicblue.

Todo

  • Brightness control
  • Color control
  • Independent brightness and color control
  • Auto install the required module

About

MagicBlue custom component for Home Assistant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%