Multiple platforms. MQTT/flux_led

Is it possible to combine multiple platforms to control a light?

I currently have:

light:
  - platform: flux_led
    devices:
      192.168.1.123:
        name: bedroom_bedlight
  - platform: mqtt
    name: "Bedroom RGB Light"
    command_topic: "bedroom/light/bed/set"
    brightness_command_topic: "bedroom/light/bed/brightness/set"
    rgb_command_topic: "bedroom/light/bed/rgb/set"
    brightness_value_template: "{{ value_json.brightness }}"
    rgb_value_template: "{{ value_json.rgb | join(',') }}"
    qos: 0
    payload_on: "ON"
    payload_off: "OFF"

The platform: flux_led works perfectly for controlling the light; however MQTT, while successfully sending messages, does not control the light. I may be looking at this wrong, but I’m still new. :stuck_out_tongue:

Are you controlling the same light here? How are you running multiple controllers to the same RGB light?

Yes, I would like to control the same light (an RGB led strip with wifi controller) with MQTT and the frontend.
I’m trying to wrap my head around the documentation, which is confusing me because MQTT is considered a platform, like flux_led is?

Does your wifi controller support BOTH flux_led and mqtt? What model is it? Why do you want to use both? Sorry, I"m just trying to get my head around what you’re trying to do in order to help.

I don’t believe it natively supports MQTT, but I thought the way that I was setting it up would allow Home Assistant to listen to the MQTT topic and then control the LED controller. Maybe I’m thinking of it wrong. Does setting up MQTT as a platform mean that the device needs to work natively with MQTT?

The LED controller is a Magic Home Ledenet controller that works under HA’s ‘flux_led’ platform.

Yes, the MQTT platform would be a light which is controlled via MQTT. What you’re looking for is probably an automation which would trigger on turning the light on or off.

Gotcha.
I’ve found an example that used MQTT, and am trying to modify it.
The issue I think I’ll have is that this action will only turn the light on, correct?
Do you know how I would go about controlling the light, other than using light.toggle OR using two alias’; one for ON and one for OFF?

Also, why do these show up as sliders in the frontend if it is just a single command, ‘ON’?

automation:
- alias: MQTT Bed Light
  trigger:  
    platform: mqtt
    topic: bedroom/light/bed/set
    # Optional
    payload_on: 'ON'
    payload_off: 'OFF'
  action:
    service: switch.turn_on
    entity_id: switch.bedroom_bedlight

I’m also not certain how to take this into RGB control with MQTT.