Transports Metropolitans de Barcelona

This sensor will provide you the remaining time, in minutes, for the next bus in a specific stop by using the iBus service.

You must create an application on developer.tmb.cat to obtain the app_id and app_key values that you will need.

Add the data to your configuration.yamlconfiguration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] file as shown in the example:

# Example configuration.yaml entry
sensor:
- platform: tmb
  app_id: !secret tmb_app_id
  app_key: !secret tmb_app_key
  stops:
    - line: V25
      stop: 3258

Configuration Variables

app_id string Required

Your TMB APP identifier.

app_key string Required

Your TMB APP key.

stops list (Optional)

List of bus stops to track.

line string Required

Identifier of the line to track.

stop integer Required

Stop identifier.

name string (Optional, default: LINE - STOP)

Name you want to use to identifier that stop.

Data provided by TMB.