diff --git a/interface/src/project/SettingsCustomization.tsx b/interface/src/project/SettingsCustomization.tsx index 37130fbad..eae53f2e4 100644 --- a/interface/src/project/SettingsCustomization.tsx +++ b/interface/src/project/SettingsCustomization.tsx @@ -499,7 +499,7 @@ const SettingsCustomization: FC = () => { value={getMaskString(de.m)} onChange={(event, mask) => { de.m = getMaskNumber(mask); - if (de.n === '' && (de.m & DeviceEntityMask.DV_READONLY)) { + if (de.n === '' && de.m & DeviceEntityMask.DV_READONLY) { de.m = de.m | DeviceEntityMask.DV_WEB_EXCLUDE; } if (de.m & DeviceEntityMask.DV_WEB_EXCLUDE) { @@ -534,7 +534,7 @@ const SettingsCustomization: FC = () => { isSet={(de.m & DeviceEntityMask.DV_WEB_EXCLUDE) === DeviceEntityMask.DV_WEB_EXCLUDE} /> - + { )} - {!deviceEntity && (formatName(de))} + {!deviceEntity && formatName(de)} {!deviceEntity && !(de.m & DeviceEntityMask.DV_READONLY) && formatValue(de.mi)} {!deviceEntity && !(de.m & DeviceEntityMask.DV_READONLY) && formatValue(de.ma)} - {!deviceEntity && (formatValue(de.v))} + {!deviceEntity && formatValue(de.v)} ))} diff --git a/src/emsdevicevalue.h b/src/emsdevicevalue.h index 5d768b7e7..dd7107b08 100644 --- a/src/emsdevicevalue.h +++ b/src/emsdevicevalue.h @@ -181,11 +181,11 @@ class DeviceValue { bool hasValue() const; bool get_min_max(int16_t & dv_set_min, uint16_t & dv_set_max); - void set_custom_minmax(); - bool get_custom_min(int16_t & val); - bool get_custom_max(uint16_t & val); - std::string get_custom_fullname() const; - std::string get_fullname() const; + void set_custom_minmax(); + bool get_custom_min(int16_t & val); + bool get_custom_max(uint16_t & val); + std::string get_custom_fullname() const; + std::string get_fullname() const; static std::string get_name(std::string & entity); // dv state flags diff --git a/src/emsesp.cpp b/src/emsesp.cpp index bfb4ee506..1d2dc4873 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -1078,7 +1078,7 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const name = "Modem"; device_type = DeviceType::CONNECT; } else if (device_id == EMSdevice::EMS_DEVICE_ID_CONVERTER) { - name = "Converter"; // generic + name = "Converter"; // generic } else if (device_id == EMSdevice::EMS_DEVICE_ID_CLOCK) { name = "Clock"; // generic device_type = DeviceType::CONTROLLER; diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 2034bd354..9afa18c29 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -629,10 +629,10 @@ void Mqtt::ha_status() { dev["sw"] = "v" + std::string(EMSESP_APP_VERSION); dev["mf"] = "proddy"; dev["mdl"] = "EMS-ESP"; - if (EMSESP::system_.ethernet_connected()) - dev["cu"] = "http://" + ETH.localIP().toString(); - else - dev["cu"] = "http://" + WiFi.localIP().toString(); +#ifndef EMSESP_STANDALONE + dev["cu"] = "http://" + (EMSESP::system_.ethernet_connected() ? ETH.localIP().toString() : WiFi.localIP().toString()); +#endif + JsonArray ids = dev.createNestedArray("ids"); ids.add("ems-esp");