Skip to content

Custom ESPHome light component for lights that use white brightness and colour temperature channels (rather than Cold White and Warm White)

Notifications You must be signed in to change notification settings

bootsa/ESPHome-Light-RGBWT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

ESPHome Custom RGBWT Light Component

Custom ESPHome light component for lights that use white brightness and colour temperature channels (rather than Cold White and Warm White)

Example for a InLine SmartHome LED bulb RGB E27.

esphome:
  devicename: rgbwt_001
  platform: ESP8266
  board: esp01_1m
  includes:
    - light-rgbwt.h

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: rgbwt_001
    password: somethingVerySecure!

captive_portal:

# Enable logging to ESPHome
logger:
  # Disable logging to serial
  baud_rate: 0

# Enable Home Assistant API
api:
  password: !secret ha_api_password

ota:
  password: !secret ota_password

output:
  - platform: esp8266_pwm
    id: output_red
    pin: GPIO14
  - platform: esp8266_pwm
    id: output_green
    pin: GPIO12
  - platform: esp8266_pwm
    id: output_blue
    pin: GPIO5
  - platform: esp8266_pwm
    id: output_brightness
    pin: GPIO15
  - platform: esp8266_pwm
    id: output_color_temp
    pin: GPIO13

light:
  - platform: custom
    lambda: |-
      auto light_out = new RGBWT(id(output_red), id(output_green), id(output_blue), id(output_brightness), id(output_color_temp));
      App.register_component(light_out);
      return {light_out};
    lights:
      - name: "RGBWT Light"
        restore_mode: RESTORE_DEFAULT_ON

All thanks to @jesserockz and @EuroTrash on ESPHome Discord and original repo by dieselrabbit.

#TODO

  • pass in warm and cold colour temperatures (replace hardcoded values)

About

Custom ESPHome light component for lights that use white brightness and colour temperature channels (rather than Cold White and Warm White)

Topics

Resources

Stars

Watchers

Forks

Languages

  • C++ 100.0%