mirror of
https://github.com/Laxilef/OTGateway.git
synced 2026-11-02 22:48:44 +05:00
fix: generation of default_entity_id for HA fixed
This commit is contained in:
1 parent
0b60734a3b
commit
e573ce582f
2 files changed
+95
-83
No files matched your search
@@ -147,8 +147,19 @@ public:
|
||||
return topic;
|
||||
}
|
||||
|
||||
template <class DT, class VT>
|
||||
String getEntityIdWithPrefix(DT domain, VT value, char separator = '_') {
|
||||
String topic = "";
|
||||
topic.concat(domain);
|
||||
topic.concat('.');
|
||||
topic.concat(this->devicePrefix);
|
||||
topic.concat(separator);
|
||||
topic.concat(value);
|
||||
return topic;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
String getObjectIdWithPrefix(T value, char separator = '_') {
|
||||
String getUniqueIdWithPrefix(T value, char separator = '_') {
|
||||
String topic = "";
|
||||
topic.concat(this->devicePrefix);
|
||||
topic.concat(separator);
|
||||
|
||||
Reference in new issue
Block a user