allow change customization device without reboot

This commit is contained in:
MichaelDvP
2023-01-28 15:15:21 +01:00
parent c38ad8e382
commit bbf4431b5f
2 changed files with 2 additions and 2 deletions

View File

@@ -244,6 +244,7 @@ const SettingsCustomization: FC = () => {
const selected_device = parseInt(event.target.value, 10);
setSelectedDevice(selected_device);
fetchDeviceEntities(devices?.devices[selected_device].i);
setRestartNeeded(false);
}
};

View File

@@ -269,8 +269,7 @@ void WebCustomizationService::custom_entities(AsyncWebServerRequest * request, J
bool is_set = false;
for (const JsonVariant id : entity_ids_json) {
std::string id_s = id.as<std::string>();
id_s = DeviceValue::get_name(id_s);
if (id_s == name) {
if (name == DeviceValue::get_name(id_s)) {
is_set = true;
need_reboot = true;
break;