Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions source/_integrations/data_grand_lyon.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,32 @@ For each transit stop you add, the following sensor entities are created:
- **Next departure 3 type**
- **Description**: Whether the departure time is _estimated_ or _theoretical_. Disabled by default.

## Examples

### Refresh data more frequently during a time window

Get fresher upcoming-departure data before your commute without raising the polling rate the rest of the day. This blueprint refreshes a transit stop's sensors at a configurable interval inside a time window — by default, every minute between 8:00 and 9:00.

{% my blueprint_import badge blueprint_url="https://www.home-assistant.io/blueprints/integrations/data_grand_lyon_refresh_during_time_window.yaml" %}

{% details "Example YAML" %}

```yaml
triggers:
- trigger: time_pattern
minutes: "/1"
conditions:
- condition: time
after: "08:00:00"
before: "09:00:00"
actions:
- action: homeassistant.update_entity
target:
entity_id: sensor.my_stop_next_departure_1
```

{% enddetails %}

## Data updates

The integration polls data from the Data Grand Lyon API every 5 minutes by default.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
blueprint:
name: "Data Grand Lyon: refresh more frequently during a time window"
description: >
Refresh a Data Grand Lyon transit stop's sensors more frequently during a
configurable time window — by default, every minute between 8:00 and 9:00.


Useful to get fresher upcoming-departure data before your commute without
raising the polling rate the rest of the day.


Tip: refreshing one sensor of a transit stop refreshes every sensor for
that stop, since they share the same data source. You only need to pick
one sensor per stop.
domain: automation
input:
sensor:
name: Sensor to refresh
description: A sensor from a Data Grand Lyon transit stop.
selector:
entity:
filter:
integration: data_grand_lyon
domain: sensor
start_time:
name: Start time
description: When to start refreshing more frequently.
default: "08:00:00"
selector:
time:
end_time:
name: End time
description: When to stop refreshing more frequently.
default: "09:00:00"
selector:
time:
interval_minutes:
name: Refresh interval (minutes)
description: How often to refresh the data, in minutes.
default: 1
selector:
number:
min: 1
max: 5
step: 1
unit_of_measurement: min
mode: slider
trigger_variables:
interval_minutes: !input interval_minutes
triggers:
- trigger: time_pattern
minutes: "/{{ interval_minutes }}"
conditions:
- condition: time
after: !input start_time
before: !input end_time
actions:
- action: homeassistant.update_entity
target:
entity_id: !input sensor
Loading