fix: EntitySelect not showing selected value in weather/processed CSS editors
Lint & Test / test (push) Successful in 1m46s

After _populateWeatherSourceDropdown() and _populateProcessedSelectors()
create new EntitySelect instances, the subsequent .value = assignment on
the native <select> doesn't trigger _syncTrigger(), so the trigger
button still shows "—". Call .refresh() after setting the value.
This commit is contained in:
2026-04-12 20:47:33 +03:00
parent cc9900d801
commit d3cd48e7a7
@@ -1227,6 +1227,7 @@ const _typeHandlers: Record<string, { load: (...args: any[]) => any; reset: (...
await weatherSourcesCache.fetch();
_populateWeatherSourceDropdown();
(document.getElementById('css-editor-weather-source') as HTMLSelectElement).value = css.weather_source_id || '';
if (_weatherSourceEntitySelect) _weatherSourceEntitySelect.refresh();
_ensureWeatherSpeedWidget().setValue(css.speed ?? 1.0);
_ensureWeatherTempInfluenceWidget().setValue(css.temperature_influence ?? 0.5);
},
@@ -1249,7 +1250,9 @@ const _typeHandlers: Record<string, { load: (...args: any[]) => any; reset: (...
await colorStripSourcesCache.fetch();
_populateProcessedSelectors();
(document.getElementById('css-editor-processed-input') as HTMLInputElement).value = css.input_source_id || '';
if (_processedInputEntitySelect) _processedInputEntitySelect.refresh();
(document.getElementById('css-editor-processed-template') as HTMLInputElement).value = css.processing_template_id || '';
if (_processedTemplateEntitySelect) _processedTemplateEntitySelect.refresh();
},
async reset(presetType) {
if (presetType === 'processed') {