|
@ -73,11 +73,11 @@ void _haSendSwitch(unsigned char i, JsonObject& config) { |
|
|
if (relayCount()) { |
|
|
if (relayCount()) { |
|
|
config["state_topic"] = mqttTopic(MQTT_TOPIC_RELAY, i, false); |
|
|
config["state_topic"] = mqttTopic(MQTT_TOPIC_RELAY, i, false); |
|
|
config["command_topic"] = mqttTopic(MQTT_TOPIC_RELAY, i, true); |
|
|
config["command_topic"] = mqttTopic(MQTT_TOPIC_RELAY, i, true); |
|
|
config["payload_on"] = String("1"); |
|
|
|
|
|
config["payload_off"] = String("0"); |
|
|
|
|
|
|
|
|
config["payload_on"] = String(HOMEASSISTANT_PAYLOAD_ON); |
|
|
|
|
|
config["payload_off"] = String(HOMEASSISTANT_PAYLOAD_OFF); |
|
|
config["availability_topic"] = mqttTopic(MQTT_TOPIC_STATUS, false); |
|
|
config["availability_topic"] = mqttTopic(MQTT_TOPIC_STATUS, false); |
|
|
config["payload_available"] = String("1"); |
|
|
|
|
|
config["payload_not_available"] = String("0"); |
|
|
|
|
|
|
|
|
config["payload_available"] = String(HOMEASSISTANT_PAYLOAD_ON); |
|
|
|
|
|
config["payload_not_available"] = String(HOMEASSISTANT_PAYLOAD_OFF); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#if LIGHT_PROVIDER != LIGHT_PROVIDER_NONE
|
|
|
#if LIGHT_PROVIDER != LIGHT_PROVIDER_NONE
|
|
|