Fix Ring detection

This commit is contained in:
iranl
2024-11-04 21:14:53 +01:00
parent 791c7e21fe
commit 7ea04e6366
8 changed files with 41 additions and 35 deletions

View File

@@ -2700,6 +2700,7 @@ void NukiNetwork::publishHASSConfigAdditionalOpenerEntities(char *deviceType, co
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);