#759 add option to enable multiple instances to keep backward compatibllity with v3.4

This commit is contained in:
proddy
2022-12-05 21:33:10 +01:00
parent fd04f8be5a
commit 1af1a1863a
6 changed files with 53 additions and 24 deletions

View File

@@ -179,6 +179,10 @@ class Mqtt {
return nested_format_ == NestedFormat::NESTED;
}
static bool multiple_instances() {
return multiple_instances_;
}
static void nested_format(uint8_t nested_format) {
nested_format_ = nested_format;
}
@@ -314,6 +318,7 @@ class Mqtt {
static bool mqtt_enabled_;
static bool ha_enabled_;
static uint8_t nested_format_;
static bool multiple_instances_;
static std::string discovery_prefix_;
static bool publish_single_;
static bool publish_single2cmd_;