mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-28 13:57:04 +00:00
33 lines
1.5 KiB
Markdown
33 lines
1.5 KiB
Markdown
|
|
|
|
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.
|
|
|
|
1. Go to {% my integrations title="**Settings** > **Devices & Services**" %}, and select your integration.
|
|
2. On the integration entry, select the three dots.
|
|
- Then, select **System options** and toggle the button to disable polling.
|
|

|
|
3. To define your custom polling interval, create an automation.
|
|
- Go to {% my automations title="**Settings** > **Automations & Scenes**" %} and create a new automation.
|
|
- Define any trigger and condition you like.
|
|
- Under action, select **Call service** and use the [`homeassistant.update_entity` service](/integrations/homeassistant/#service-homeassistantupdate_entity).
|
|

|
|
- Example in YAML.
|
|
|
|
```yaml
|
|
automation:
|
|
- alias: "Only update weather information every 20 minutes when I'm home"
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: "/20"
|
|
condition:
|
|
- condition: state
|
|
entity_id: device_tracker.cynthia
|
|
state: home
|
|
action:
|
|
- service: homeassistant.update_entity
|
|
target:
|
|
entity_id: weather.home
|
|
```
|
|
|
|
4. Save your new automation to poll for data.
|