mirror of
https://github.com/adrianjagielak/home-assistant-futurehome.git
synced 2025-09-13 15:47:08 +00:00
Do not periodically poll in demo mode
This commit is contained in:
parent
0989543a9d
commit
de14075234
@ -1,6 +1,6 @@
|
||||
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
|
||||
name: Futurehome
|
||||
version: "0.0.23"
|
||||
version: "0.0.24"
|
||||
slug: futurehome
|
||||
description: Local Futurehome Smarthub integration
|
||||
url: "https://github.com/adrianjagielak/home-assistant-futurehome"
|
||||
|
@ -223,7 +223,7 @@ import { delay } from "./utils";
|
||||
// Request initial state
|
||||
pollState();
|
||||
// Then poll every 30 seconds
|
||||
setInterval(pollState, 30000);
|
||||
if (!demoMode) { setInterval(pollState, 30 * 1000); }
|
||||
|
||||
const pollDevices = () => {
|
||||
log.debug("Refreshing Vinculum devices after 30 minutes...");
|
||||
@ -238,7 +238,7 @@ import { delay } from "./utils";
|
||||
}).catch(e => log.warn("Failed to request state", e));
|
||||
};
|
||||
// Poll devices every 30 minutes (1800000 ms)
|
||||
setTimeout(pollDevices, 30 * 60 * 1000);
|
||||
if (!demoMode) { setInterval(pollDevices, 30 * 60 * 1000); }
|
||||
|
||||
ha.on('message', (topic, buf) => {
|
||||
// Handle Home Assistant command messages
|
||||
|
Loading…
x
Reference in New Issue
Block a user