mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 09:19:51 +03:00
allow change customization device without reboot
This commit is contained in:
@@ -244,6 +244,7 @@ const SettingsCustomization: FC = () => {
|
|||||||
const selected_device = parseInt(event.target.value, 10);
|
const selected_device = parseInt(event.target.value, 10);
|
||||||
setSelectedDevice(selected_device);
|
setSelectedDevice(selected_device);
|
||||||
fetchDeviceEntities(devices?.devices[selected_device].i);
|
fetchDeviceEntities(devices?.devices[selected_device].i);
|
||||||
|
setRestartNeeded(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -269,8 +269,7 @@ void WebCustomizationService::custom_entities(AsyncWebServerRequest * request, J
|
|||||||
bool is_set = false;
|
bool is_set = false;
|
||||||
for (const JsonVariant id : entity_ids_json) {
|
for (const JsonVariant id : entity_ids_json) {
|
||||||
std::string id_s = id.as<std::string>();
|
std::string id_s = id.as<std::string>();
|
||||||
id_s = DeviceValue::get_name(id_s);
|
if (name == DeviceValue::get_name(id_s)) {
|
||||||
if (id_s == name) {
|
|
||||||
is_set = true;
|
is_set = true;
|
||||||
need_reboot = true;
|
need_reboot = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user