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:
dadaloop82
2026-05-23 20:41:29 +00:00
parent 43e0ac9da3
commit 6fa2e4d830
2 changed files with 32 additions and 8 deletions
+6
View File
@@ -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)