fix MQTT discovery of custom entity doesn't consider type of data #1587

This commit is contained in:
proddy
2024-02-10 09:51:29 +01:00
parent e6b61b7a51
commit 257b40c2e4
4 changed files with 113 additions and 104 deletions

View File

@@ -221,6 +221,8 @@ class Mqtt {
static std::string tag_to_topic(uint8_t device_type, uint8_t tag);
static void add_ha_uom(JsonObject doc, const uint8_t type, const uint8_t uom, const char * entity = nullptr);
static void add_ha_sections_to_doc(const char * name,
const char * state_t,
JsonDocument & config,