Skip to content

droso-hass/idfm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ile de france mobilités integration for Home Assistant

hacs_badge

Allows to retreive next schedules for a stations on a specific line and traffic informations for a line. Metro, RER, Transilien, Tram and BUS are supported.

Based on the PRIM API and the python library idfm-api.

Note on line/stop selection

The lines and stops listings are now fetched at the first run of the configuration process (and re-fetched if you restart home-assistant), this will take a few seconds. This means that the datasets are now more up-to-date, which also means that they are subject to changes: some lines/stops might disappear if the traffic is interrupted/replaced by bus, especially for train lines.

Before opening an issue, please ensure that you can find your line (with the correct TransportMode) here (note the ID_Line field) and that there are stops corresponding to this ID_Line (paste it in the search field) here.

Configuration

In order to use this integration, you need to create an account on the PRIM website and get your API token here.

By default, each instance of the integration will generate 2 requests every 3 min (except between 1h30 and 5h30).

The limitations are set to:

So with the default settings you generate about 400 calls per day, thus you are limited to a maximum of 50 instances.

Manually Updating

If the default interval is not ok for you, you can decide to manually trigger the updates of the entities:

Go in Settings > Integrations then on the IDFM integration click on the three-dots button and select "System Options". You can now click on "Enable polling for updates." to disable the auto updating (note that you will need to restart Home Assistant for the changes to take effect).

You can now use the homeassistant.update_entity service to manually update the entities (see the example below), you only need to reference one entity to refresh all the entities of the same instance.

You can also use the examples of the maps travel time integration as a source of inspiration.

service: homeassistant.update_entity
target:
  entity_id: sensor.idfm_gare_de_lyon_paris_chateau_de_vincennes_0