|
@ -24,7 +24,6 @@ void _haSendMagnitude(unsigned char i, JsonObject& config) { |
|
|
unsigned char type = magnitudeType(i); |
|
|
unsigned char type = magnitudeType(i); |
|
|
config["name"] = getSetting("hostname") + String(" ") + magnitudeTopic(type); |
|
|
config["name"] = getSetting("hostname") + String(" ") + magnitudeTopic(type); |
|
|
config.set("platform", "mqtt"); |
|
|
config.set("platform", "mqtt"); |
|
|
config.set("device_class", "sensor"); |
|
|
|
|
|
config["state_topic"] = mqttTopic(magnitudeTopicIndex(i).c_str(), false); |
|
|
config["state_topic"] = mqttTopic(magnitudeTopicIndex(i).c_str(), false); |
|
|
config["unit_of_measurement"] = String("\"") + magnitudeUnits(type) + String("\""); |
|
|
config["unit_of_measurement"] = String("\"") + magnitudeUnits(type) + String("\""); |
|
|
|
|
|
|
|
|