mion00 / color-temperature-light-mixer

Home Assistant integration to mix multiple lights of various color temperatures into a single light
GNU General Public License v3.0
13 stars 2 forks source link
custom-component home-assistant home-assistant-integration leds light

logo logo

Color Temperature Light Mixer

Home Assistant integration to group multiple light sources into a single "virtual" color temperature-changing light.

Useful for instance with LED strips having separate cold white/warm white channels (CCT or CWWW LED), in which two separate light entities are available in Home Assistant, one for each color temperature. This integration groups together the two lights, allowing them to be controlled as a single entity in HA.

An example application is a "dumb"/analog LED strip controlled by a Shelly RGBW2 (configured in 4 white channels mode), where the cold light and warm light channels are each connected to a separate channel in the Shelly.


Features

Installation

Install from HACS (recommended)

  1. Requirements: have HACS installed, this will allow you to easily manage and track updates.
  2. Add this repository as a Custom repository (more details) or just press the button below:\ Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.
  3. Once added, search in HACS for "Color Temperature Light Mixer".
  4. Click Install.
  5. You can configure the component via:
    1. Home Assistant UI\ In the HA UI go to "Configuration" > "Integrations" click "+" and search for "Color Temperature Light Mixer".
    2. configuration.yaml\ Follow the instructions below, then restart Home Assistant.

Manual installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called color_temperature_light_mixer.
  4. Download the file color_temperature_light_mixer.zip from the latest release section in this repository.
  5. Extract all files from this archive you downloaded in the directory (folder) you created.
  6. Restart Home Assistant
  7. You can configure the component via:
    1. Home Assistant UI\ In the HA UI go to "Configuration" > "Integrations" click "+" and search for "Color Temperature Light Mixer".
    2. configuration.yaml\ Follow the instructions below, then restart Home Assistant.

Configuration

The integration can be configured via either HA UI and YAML.

The following configuration options are supported:

Name Description
name The name of the "virtual" color changing temperature light.
warm_light_entity_id The entity_id representing the warm light (yellow-ish color).
warm_light_color_temp_kelvin The color temperature of the warm light, in Kelvin.
cold_light_entity_id The entity_id representing the cold light (blu-ish color).
cold_light_color_temp_kelvin The color temperature of the cold light, in Kelvin.

YAML file

The same configuration options can be specified via the configuration.yaml. See the following snippet for an example:

color_temperature_light_mixer:
  - name: Virtual
    warm_light_entity_id: light.warm_white
    warm_light_color_temp_kelvin: 3000
    cold_light_entity_id: light.cold_white
    cold_light_color_temp_kelvin: 6000

This integration will set up the following entities (one for each of your defined configurations):

Platform Description
light The "virtual" color changing temperature light combining the warm and cold light entities.

Keeping track of updates

You can automatically track new versions of this component and update it by HACS, or follow this repository on GitHub to be notified of new releases.

Known limitations and issues

Troubleshooting

You can enable debug logs in two different ways:

Contributions are welcome!

This is an active open-source project. We are always open to people who want to use the code or contribute to it.

We have set up a separate document containing our contribution guidelines.

Thank you for being involved!

Authors & contributors

For a full list of all authors and contributors, check the contributor's page.

Credits

The original inspiration came from the template light provided by gfrancesco, as part of this HA forum thread.

This Home Assistant custom component was created and is updated using the HA-Blueprint template. You can use this template to maintain your own Home Assistant custom components.