Skip to content

Document how to configure Home-assistant with RGB/White lights (AI_LIGHT) and MQTT #144

Closed
@xoseperez

Description

@xoseperez

Originally reported by: JF002 (Bitbucket: JF002, GitHub: JF002)


Espurna 1.8 supports AI Thinker RGB/White light bulbs, with ON/OFF command and color switching, but te integration with Home-Assistant and MQTT doesn't seem to be completely documented.
Moreover, it's not clear if color temperature, brightness and white values are supported for now.

Here is an example of my working configuration for the light, with ON/OFF and color settings:

#!python
light
  - platform: mqtt
    name: 'AI Light'
    state_topic: '/light/AI_LIGHT_219F36/relay/0'
    command_topic: '/light/AI_LIGHT_219F36/relay/0'
    payload_on: 1
    payload_off: 0
    rgb_state_topic: '/light/AI_LIGHT_219F36/color'
    rgb_command_topic: '/light/AI_LIGHT_219F36/color'
    rgb: true
    optimistic: false

Home-assistant also supports the following settings: white value, brightness and color temp (see https://home-assistant.io/components/light.mqtt/).
I tried adding these lines in the configuration file, but it doesn't work correctly:

#!python
    color_temp: true
    color_temp_command_topic: '/light/AI_LIGHT_219F36/color'
    color_temp_state_topic: '/light/AI_LIGHT_219F36/color''
    brightness: true
    brightness_command_topic:  '/light/AI_LIGHT_219F36/color'
    brightness_state_topic: '/light/AI_LIGHT_219F36/color'
    white_value: true
    white_value_command_topic: '/light/AI_LIGHT_219F36/color'
    white_value_state_topic: '/light/AI_LIGHT_219F36/color'

Are these functionalities already supported? If yes, how to use them (topics, format,...) ?

I would be happy to write some documentation once I manage to make it work :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions