This commit is contained in:
iranl
2024-11-10 21:20:21 +01:00
committed by GitHub
parent 6a08e2690b
commit b1380b5e0c

View File

@@ -1954,6 +1954,7 @@ void HomeAssistantDiscovery::publishHASSConfigAdditionalOpenerEntities(char *dev
json = createHassJson(uidString, "_ring_event", "Ring", name, baseTopic, String("~") + mqtt_topic_lock_ring, deviceType, "doorbell", "", "", "", {{(char*)"val_tpl", (char*)"{ \"event_type\": \"{{ value }}\" }"}});
json["event_types"][0] = "ring";
json["event_types"][1] = "ringlocked";
json["event_types"][2] = "standby";
serializeJson(json, _buffer, _bufferSize);
String path = createHassTopicPath("event", "ring", uidString);
_device->mqttPublish(path.c_str(), MQTT_QOS_LEVEL, true, _buffer);
@@ -3065,4 +3066,4 @@ JsonDocument HomeAssistantDiscovery::createHassJson(const String& uidString,
}
return json;
}
}