diff --git a/source/_integrations/tmb.markdown b/source/_integrations/tmb.markdown new file mode 100644 index 00000000000..47ed71cf9b6 --- /dev/null +++ b/source/_integrations/tmb.markdown @@ -0,0 +1,57 @@ +--- +title: "Transports Metropolitans de Barcelona" +description: "Instructions on how to integrate TMB iBus sensor within Home Assistant." +logo: tmb.png +ha_category: + - Transport +ha_release: 0.104 +ha_iot_class: Local Polling +--- + +This sensor will provide you the remaining time, in minutes, for the next bus in a specific stop by using the [iBus service](https://www.tmb.cat/en/barcelona/tmb-ibus). + +You must create an application on [developer.tmb.cat](https://developer.tmb.cat/account/applications/public/new) to obtain the `app_id` and `app_key` values that you will need. + +Add the data to your `configuration.yaml` file as shown in the example: + +```yaml +# 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 %} +app_id: + description: Your TMB APP identifier. + required: true + type: string +app_key: + description: Your TMB APP key. + required: true + type: string +stops: + description: List of bus stops to track. + required: false + type: list + keys: + line: + description: Identifier of the line to track. + required: true + type: string + stop: + description: Stop identifier. + required: true + type: integer + name: + description: Name you want to use to identifier that stop. + required: false + type: string + default: "LINE - STOP" +{% endconfiguration %} + +Data provided by [TMB](https://tmb.cat/). diff --git a/source/images/supported_brands/tmb.png b/source/images/supported_brands/tmb.png new file mode 100644 index 00000000000..0606dd3f180 Binary files /dev/null and b/source/images/supported_brands/tmb.png differ