names for entityFormat and discoveryType

This commit is contained in:
MichaelDvP
2023-03-14 15:17:16 +01:00
parent 0b0ae2fbc2
commit 4ba9f6f330
5 changed files with 11 additions and 8 deletions

View File

@@ -155,7 +155,7 @@ void Shower::set_shower_state(bool state, bool force) {
doc["name"] = "Shower Active";
char str[70];
if (Mqtt::entity_format() == 2) {
if (Mqtt::entity_format() == Mqtt::entitiyFormat::MULTI_SHORT) {
snprintf(str, sizeof(str), "%s_shower_active", Mqtt::basename().c_str());
} else {
snprintf(str, sizeof(str), "shower_active"); // v3.4 compatible