use same ha_uom function to add uom, state and device class

This commit is contained in:
proddy
2025-01-22 22:31:21 +01:00
parent 5f52a646ff
commit e6f15681c0
6 changed files with 30 additions and 23 deletions

View File

@@ -232,7 +232,7 @@ class Mqtt {
static std::string tag_to_topic(uint8_t device_type, int8_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_uom(JsonObject doc, const uint8_t type, const uint8_t uom, const char * entity = nullptr, bool is_discovery = true);
static void add_ha_sections_to_doc(const char * name,
const char * state_t,