This commit is contained in:
MichaelDvP
2024-01-06 16:36:01 +01:00
232 changed files with 4230 additions and 4692 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();
@@ -218,8 +218,13 @@ class Mqtt {
static std::string tag_to_topic(uint8_t device_type, uint8_t tag);
static void
add_avty_to_doc(const char * state_t, const JsonObject & doc, const char * cond1 = nullptr, const char * cond2 = nullptr, const char * negcond = nullptr);
static void add_ha_sections_to_doc(const char * name,
const char * state_t,
JsonDocument & config,
const bool is_first = false,
const char * cond1 = nullptr,
const char * cond2 = nullptr,
const char * negcond = nullptr);
private:
static uuid::log::Logger logger_;