You thought about it, do IT !

ESPHome MultiSensor – RGB LED Indicator

ESPHome MultiSensor – RGB LED Indicator
Project Progress
15%

We are going to add an RGB indicator to our MultiSensor project. The module i used is a HW-479 also know as KY-016 .

Parts you need :

Here is the electronic wiring diagram :

Now go to Home Assistant, ESPHome (See illuminance tutorial if needed).

Here is the code to use (Use previously generated code before output declaration, with your own keys instead of ***) :

esphome:
  name: multisensor1
  friendly_name: MultiSensor1

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "*****************************"

ota:
  password: "**************************"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Multisensor1 Fallback Hotspot"
    password: "*******************"

output:
  - platform: esp8266_pwm
    id: RGB_Led_Red
    pin: D5
  - platform: esp8266_pwm
    id: RGB_Led_Green
    pin: D6
  - platform: esp8266_pwm
    id: RGB_Led_Blue
    pin: D7
    
light:

  - platform: rgb
    name: "LED RGB"
    red: RGB_Led_Red
    green: RGB_Led_Green
    blue: RGB_Led_Blue

Nothing more needed. Send the firmware to the WeMos D1.

Go to settings in Home Assistant, devices, select ESPHome integration, devices –> MultiSensor1

You will see the switch to activate the RGB Led :

Now you can select the light for advanced control :

You can select light intensity and color :

Have fun setting up automations !

do-it.dev Avatar
if you liked it, please contribute !

Leave a Reply

Your email address will not be published. Required fields are marked *

Aurélien Bordinat

I am a french computer engineer, adept of DIY, home automation and new technologies. When i’m not busy trail running, i spend some time prototyping.