From 2f4b4ef5c3c828387b0e70a3e0f8c45d52daf616 Mon Sep 17 00:00:00 2001 From: Myron Blair Date: Mon, 22 Jun 2026 03:56:47 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20HA=20tab=20=E2=80=94=20filter=20scenes/?= =?UTF-8?q?media=5Fplayer,=20nightly=20full=20resync=20cron,=20remove=20JS?= =?UTF-8?q?=20polling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ha.php skipDomains: added media_player, scene - ha.php skipKeywords: konnected, energy/power/voltage/current, full camera list - stats_cache.php: same filter updates, removed scene/media_player from sync - Removed JS setInterval polling; entity state kept fresh by HA agent push - Added nightly 3am cron for full HA entity resync --- api/endpoints/ha.php | 2 +- api/endpoints/stats_cache.php | 2 +- public_html/assets/js/jarvis-app.js | 11 ----------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/api/endpoints/ha.php b/api/endpoints/ha.php index a80f340..c99be19 100644 --- a/api/endpoints/ha.php +++ b/api/endpoints/ha.php @@ -83,7 +83,7 @@ if ($method === 'POST' && $action === 'service') { // Serve entities from ha_entities table (real-time agent push data) $skipDomains = ['sensor','binary_sensor','button','update','select','number', 'device_tracker','event','image','person','zone','tts','conversation', - 'assist_satellite','input_button','media_player']; + 'assist_satellite','input_button','media_player','scene']; $skipKeywords = [ // HACS / system toggles 'pre_release','get_hacs','matter_server','zerotier','mariadb', diff --git a/api/endpoints/stats_cache.php b/api/endpoints/stats_cache.php index 61ff1cc..b9c60bc 100644 --- a/api/endpoints/stats_cache.php +++ b/api/endpoints/stats_cache.php @@ -134,7 +134,7 @@ if (HA_TOKEN !== 'YOUR_HA_TOKEN_HERE' && strpos(HA_URL, '10.48.200.X') === false $config = $configRaw ? json_decode($configRaw, true) : []; // Controllable domains only — skip read-only sensors to keep list manageable - $interesting = ['light','switch','scene','media_player','alarm_control_panel', + $interesting = ['light','switch','alarm_control_panel', 'lawn_mower','water_heater','fan','lock','cover','climate','input_boolean']; // Switches that are HA internals / camera settings, not physical devices $skipKeywords = ['pre_release','_record','_ftp_','_push_','_hub_ringtone', diff --git a/public_html/assets/js/jarvis-app.js b/public_html/assets/js/jarvis-app.js index a262239..b71b683 100644 --- a/public_html/assets/js/jarvis-app.js +++ b/public_html/assets/js/jarvis-app.js @@ -698,16 +698,6 @@ async function loadProxmox() { } // ── HOME ASSISTANT ──────────────────────────────────────────────────── -let _haRefreshTimer = null; -function _startHARefresh() { - if (_haRefreshTimer) return; - _haRefreshTimer = setInterval(() => { - if (document.getElementById('tab-ha')?.classList.contains('active') || - document.getElementById('tab-home')?.classList.contains('active')) { - loadHA(); - } - }, 30000); -} async function loadHA() { const data = await api('ha'); const el = document.getElementById('ha-list'); @@ -733,7 +723,6 @@ async function loadHA() { } renderHATable(entities); - _startHARefresh(); } const _domainIcon = {