Custom component to support LifeSmart Cololight in Home Assistant
- In HACS go to the tab "Settings"
- Add this repository as custom repository. Category is "Integration".
- Switch to the tab "Integrations"
- Install like any other custom integration.
- Restart Home Assistant
- Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
- If you do not have a custom_components directory (folder) there, you need to create it.
- Download
cololight.zip
release version, and unzip to custom_components directory
wget https://github.com/BazaJayGee66/homeassistant_cololight/releases/download/v1.2.3/cololight.zip
unzip cololight.zip -d /path/to/custom_components
rm cololight.zip
- Restart Home Assistant
In Configuration/Integrations click on the + button, select LifeSmart Cololight and configure the options on the form.
Default Effects can be selected when creating the entity.
Custom effects can be added/deleted in configuration options once the entity has been created.
Name | Type | Required | Default | Description |
---|---|---|---|---|
platform | string | ✔ | cololight | |
host | string | ✔ | IP address of your Cololight | |
name | string | ✖ | ColoLight | Name of your entity |
default_effects | list | ✖ | All | Default Cololight effects to add |
custom_effects | map | ✖ | List of custom effects to add to entity | |
custom_effects:name | string | ✔ | Name of custom effect | |
custom_effects:color_scheme | string | ✔ | Color Scheme of effect | |
custom_effects:color | string | ✔ | Color of effect | |
custom_effects:cycle_speed | int | ✔ | Cycle speed of effect (1 - 32) | |
custom_effects:mode | int | ✔ | Mode of effect (1 - 27) |
Valid default_effects: ["80s Club", "Cherry Blossom", "Cocktail Parade", "Instagrammer", "Pensieve", "Savasana", "Sunrise", "The Circus", "Unicorns", "Christmas", "Rainbow Flow", "Music Mode", "Good Effect"]
Add a light to your configuration:
light:
- platform: cololight
name: my_cololight
host: 192.168.1.100
default_effects:
- 80s Club
- Cherry Blossom
- Cocktail Parade
- Instagrammer
custom_effects:
- name: My Cool Effect
color_scheme: Mood
color: Gold
cycle_speed: 10
mode: 1
- name: My Other Effect
color_scheme: Breath
color: Red, Green, Blue
cycle_speed: 10
mode: 1
Thanks to "Projekt: ColoLight in FHEM" for discovering how to talk with the Cololight
Please create an issue here
This section talks to how to setup and run test to ensure any development changes do not break the component.
Prerequisites
- git
- Docker
- For Linux, macOS, or Windows 10 Pro/Enterprise/Education use the current release version of Docker
- Windows 10 Home requires WSL 2 and the current Edge version of Docker Desktop (see instructions here). This can also be used for Windows Pro/Enterprise/Education.
- Visual Studio code
- Remote - Containers (VSC Extension)
More info about requirements and devcontainer in general
Getting started:
- Clone the repository to your computer.
- Open the repository using Visual Studio code.
When you open this repository with Visual Studio code you are asked to "Reopen in Container", this will start the build of the container.
If you don't see this notification, open the command palette and select Remote-Containers: Reopen Folder in Container
.
Running Tests:
Open a terminal in Visual Studio code within the Remote-Containers session. Tests can then be run using pytest.
Run all test:
pytest
Run individual test:
pytest tests/test_light.py::test_turn_on