Based on MQTT Light
user@server:~$ nano ~/.homeassistant/configuration.yaml
light:
- platform: mqtt
name: Principal
state_topic: 'edzna/principal/light/status'
command_topic: 'edzna/principal/light/switch'
rgb_state_topic: "edzna/principal/light/rgb/status"
rgb_command_topic: "edzna/principal/light/rgb/set"
optimistic: true
user@workstation:~$ mosquitto_pub -h iot.eclipse.org -p 1883 -t edzna/principal/light/status ON
user@workstation:~$ mosquitto_pub -h iot.eclipse.org -p 1883 -t edzna/principal/light/status OFF
user@workstation:~$ mosquitto_pub -h iot.eclipse.org -p 1883 -t edzna/principal/light/rgb/status -m "255,0,0"