docs: HA integration section first in README, with HACS buttons and full feature table
- Replaces the old 'New' callout with a proper dedicated section at the top of Features - Shows all 16 sensors, 6 binary sensors, 5 buttons, todo, calendar, text, 6 services - HACS and config_flow_start my.home-assistant.io badge buttons Also: fix dark mode not persisting — _setThemeMode now saves immediately to server .env
This commit is contained in:
@@ -1199,6 +1199,12 @@ function _setThemeMode(mode) {
|
||||
s.dark_mode = mode;
|
||||
saveSettingsToStorage(s);
|
||||
_applyTheme();
|
||||
// Persist dark_mode to server .env immediately (no need to send the full
|
||||
// settings payload — save_settings only updates keys present in the body
|
||||
// and keeps all other .env values intact).
|
||||
const token = document.getElementById('setting-settings-token')?.value.trim() || '';
|
||||
const headers = token ? { 'X-Settings-Token': token } : {};
|
||||
api('save_settings', {}, 'POST', { dark_mode: mode }, headers).catch(() => {});
|
||||
}
|
||||
|
||||
// Listen to system theme changes (for 'auto' mode)
|
||||
|
||||
Reference in New Issue
Block a user