From f2b0604715e6a6a725f1455d5f03db63c9dd3757 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Thu, 8 Feb 2024 10:37:42 +0100 Subject: [PATCH] Explain the custom polling (#31265) * Update define_custom_polling.md * Update source/_includes/common-tasks/define_custom_polling.md Co-authored-by: Franck Nijhof * Update source/_includes/common-tasks/define_custom_polling.md Co-authored-by: Franck Nijhof * tweaks * Move intro from reuse topic to common tasks - the rational does not need to be shown in every integration where the tasks is reused - slight rephrase of the intro section * Reduce redundancy * Tweak * Rephrase --------- Co-authored-by: Franck Nijhof Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> Co-authored-by: c0ffeeca7 --- source/_includes/common-tasks/define_custom_polling.md | 4 +++- source/common-tasks/general.markdown | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/source/_includes/common-tasks/define_custom_polling.md b/source/_includes/common-tasks/define_custom_polling.md index bfa61648392..13b3e15f2d6 100644 --- a/source/_includes/common-tasks/define_custom_polling.md +++ b/source/_includes/common-tasks/define_custom_polling.md @@ -1,6 +1,8 @@ -If you want to define a specific interval at which your device is being polled for data, you can disable the default polling interval and create your own polling service. +If you want to define a specific interval at which your device is being polled for data, you can disable the default polling interval and create your own polling automation. + +To add the automation: 1. Go to {% my integrations title="**Settings** > **Devices & Services**" %}, and select your integration. 2. On the integration entry, select the three dots. diff --git a/source/common-tasks/general.markdown b/source/common-tasks/general.markdown index 251b9d7d019..e6841034ed4 100644 --- a/source/common-tasks/general.markdown +++ b/source/common-tasks/general.markdown @@ -9,4 +9,11 @@ This section provides tasks that do not depend on a specific Home Assistant inst ## Defining a custom polling interval +Creating an automation for polling gives you more flexibility on when to poll. + +Why use an automation instead of changing the integration's configuration for polling? + +1. Not all integrations have a configurable polling interval. The homassistant.update_entity service on the other hand works with most of the integrations, no code changes required. +2. An automation allows you to poll whenever you want. For example, if you have a rate-limited solar panel provider with a maximum number of requests per day, you may want to lower/stop the polling at night but poll more frequently during the day. + {% include common-tasks/define_custom_polling.md %} \ No newline at end of file