|
|
@ -98,9 +98,10 @@ void _haSendSwitch(unsigned char i, JsonObject& config) { |
|
|
|
|
|
|
|
if (i == 0) { |
|
|
|
|
|
|
|
config["brightness_state_topic"] = mqttTopic(MQTT_TOPIC_BRIGHTNESS, false); |
|
|
|
config["brightness_command_topic"] = mqttTopic(MQTT_TOPIC_BRIGHTNESS, true); |
|
|
|
|
|
|
|
if (lightHasColor()) { |
|
|
|
config["brightness_state_topic"] = mqttTopic(MQTT_TOPIC_BRIGHTNESS, false); |
|
|
|
config["brightness_command_topic"] = mqttTopic(MQTT_TOPIC_BRIGHTNESS, true); |
|
|
|
config["rgb_state_topic"] = mqttTopic(MQTT_TOPIC_COLOR_RGB, false); |
|
|
|
config["rgb_command_topic"] = mqttTopic(MQTT_TOPIC_COLOR_RGB, true); |
|
|
|
config["color_temp_command_topic"] = mqttTopic(MQTT_TOPIC_MIRED, true); |
|
|
|