ha config to basename, analog/dallas allow single/nested with ha

This commit is contained in:
MichaelDvP
2022-09-23 21:54:13 +02:00
parent 081c11c503
commit f1bb183017
4 changed files with 93 additions and 81 deletions

View File

@@ -142,6 +142,10 @@ class Mqtt {
return mqtt_base_;
}
static std::string basename() {
return mqtt_basename_;
}
// returns the discovery MQTT topic prefix and adds a /
static std::string discovery_prefix() {
if (discovery_prefix_.empty()) {
@@ -286,9 +290,8 @@ class Mqtt {
static bool ha_climate_reset_;
// settings, copied over
static std::string system_hostname_;
static std::string mqtt_base_;
static std::string mqtt_basename_;
static uint8_t mqtt_qos_;
static bool mqtt_retain_;
static uint32_t publish_time_;