support domoticz - MQTT autodiscovery in Domoticz not working #1360

This commit is contained in:
Proddy
2024-01-04 18:10:53 +01:00
parent 591b8afcb0
commit e62fc14b6d
3 changed files with 25 additions and 20 deletions

View File

@@ -35,7 +35,7 @@ using mqtt_sub_function_p = std::function<bool(const char * message)>;
class Mqtt {
public:
enum discoveryType : uint8_t { HOMEASSISTANT, DOMOTICZ };
enum discoveryType : uint8_t { HOMEASSISTANT, DOMOTICZ, DOMOTICZ_LATEST };
enum entityFormat : uint8_t { SINGLE_LONG, SINGLE_SHORT, MULTI_SHORT };
void loop();
@@ -219,7 +219,7 @@ class Mqtt {
static void add_ha_sections_to_doc(const std::string & name,
const char * state_t,
const JsonObject & doc,
const JsonObject & config,
const bool is_first = false,
const char * cond1 = nullptr,
const char * cond2 = nullptr,