Skip to content

Commit

Permalink
allow change customization device without reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Jan 28, 2023
1 parent c38ad8e commit bbf4431
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions interface/src/project/SettingsCustomization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};

Expand Down
3 changes: 1 addition & 2 deletions src/web/WebCustomizationService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bbf4431

Please sign in to comment.