STM Metro Status is a Home Assistant integration to grab the current status of the STM's metro lines. This script uses the STM AJAX API to get the real-time status of Montreal's metro lines and updates Home Assistant sensors with the data.
This project is licensed under MIT licence.
- Fetches real-time metro status from STM's website.
- Updates custom Home Assistant sensors with metro status.
- Extensible to support additional metro services.
There are two ways to install this integration into HomeAssistant you can either install it through HACS or manually.
You can either click this button or add mattyes/STM-webscrap-for-HomeAssistant as a repository in HACS
Clone the Git Repo:
git clone https://github.com/mattyes/STM-webscrap-for-HomeAssistant.git
Copy the repository folder folder into your Home Assistant's custom_components directory
Restart Home Assistant
- Go to Settings > Devices & Services.
- Click Add Integration in the bottom-right corner.
- Search for STM Metro Status.
- Click it and confirm setup.
The integration automatically creates the following sensors:
sensor.stm_line_1_greensensor.stm_line_2_orangesensor.stm_line_5_bluesensor.stm_line_4_yellow
Each sensor shows the current status (e.g., "Normal service", "Delays", etc.).
Contributions are welcome! Here's how you can help:
- Add support for more metro services or transit systems.
To contribute, fork the repository, make your changes, and submit a pull request.
- Allow dynamic configuration for additional metro services through a YAML file or the Home Assistant UI.
- mattyes - Original script
- jerji - Optimization and addon
- STM - Data (https://www.stm.info/en/ajax/etats-du-service)
This project is licensed under the MIT licence.