From 85d413baa19aff7ee4418caf0ac5fe1af843ec34 Mon Sep 17 00:00:00 2001 From: xiaoshi <115949669+xiaoshi930@users.noreply.github.com> Date: Sat, 20 Dec 2025 01:48:21 +0800 Subject: [PATCH] Update data refresh interval to 3 seconds Changed the data refresh interval from 300 seconds to 3 seconds. --- xiaoshi-device-ha-info-button.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/xiaoshi-device-ha-info-button.js b/xiaoshi-device-ha-info-button.js index 5e27e5a..631b158 100644 --- a/xiaoshi-device-ha-info-button.js +++ b/xiaoshi-device-ha-info-button.js @@ -802,18 +802,11 @@ export class XiaoshiHaInfoButton extends LitElement { // 设置主题属性 this.setAttribute('theme', this._evaluateTheme()); - //button新元素 开始 - setTimeout(() => { - this._loadUpdateData(); - this._loadOfflineDevices(); - }, 50); - //button新元素 结束 - // 每300秒刷新一次数据,减少频繁刷新 this._refreshInterval = setInterval(() => { this._loadUpdateData(); this._loadOfflineDevices(); - }, 300000); + }, 3000); } _evaluateTheme() {