From 88bc8ce39d067d4a660ab1e871b68d2371af00c6 Mon Sep 17 00:00:00 2001 From: Rishat Askarov Date: Sun, 15 Sep 2019 19:50:27 +0300 Subject: [PATCH 1/6] adding documentation for the yandex_transport component https://github.com/home-assistant/home-assistant/pull/26252#discussion_r321543743 --- source/_components/yandex_transport.markdown | 51 ++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 source/_components/yandex_transport.markdown diff --git a/source/_components/yandex_transport.markdown b/source/_components/yandex_transport.markdown new file mode 100644 index 000000000000..95d84bf2632d --- /dev/null +++ b/source/_components/yandex_transport.markdown @@ -0,0 +1,51 @@ +--- +title: "Yandex transport" +description: "Instructions on how to setup Yandex transport with Home Assistant." +logo: yandex.png +ha_category: + - Transport +ha_release: 0.99 +redirect_from: + - /components/sensor.yandex_tranport/ +--- + +The `yandex_tranport` sensor platform uses [Yandex Maps](https://maps.yandex.ru/) it will give you the time until the next departure time from a bus/tramway/etc stop. + +The [Yandex Maps](https://maps.yandex.ru/) website can help to determine the id of your bus stop. You can select bus stop by clicking on the map, and look to the url: + +https://yandex.ru/maps/213/moscow/?ll=37.722565%2C55.806662&masstransit%5BstopId%5D=stop__9642962&mode=masstransit&z=16.52 +where stop id is: **9642962** + +if you want to look only specific routes, you can add them in routes section. + +## Configuration + +To activate Yandex Transport, add the following lines to your `configuration.yaml`: + +```yaml +# Example configuration.yaml entry +sensor: + - platform: yandex_tranport + stop_id: YOUR_STOP_ID + routes: #optionaly + - 916 + - 118 +``` + +{% configuration %} +stop_id: + description: The ID of the transport stop to get the information for. + required: true + type: string +routes: + description: A list of a specific bus/tramway/etc routes at the stop. This is the same as the bus number, e.g., `83`. If the routes with letters contain cyrillic symbols, so write them to configuration.yaml BY cyrillic. + required: false + type: list +name: + description: A friendly name for this sensor. + required: false + default: Yandex Transport + type: string +{% endconfiguration %} + +Data provided by https://maps.yandex.ru \ No newline at end of file From 6286b5815022b18695cb70cf0389050e5ccf7a96 Mon Sep 17 00:00:00 2001 From: Askarov Rishat Date: Mon, 16 Sep 2019 10:04:12 +0300 Subject: [PATCH 2/6] fixing comments, add some configuration information --- source/_components/yandex_transport.markdown | 39 ++++++++++++++++++-- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/source/_components/yandex_transport.markdown b/source/_components/yandex_transport.markdown index 95d84bf2632d..8f94f2ce5cff 100644 --- a/source/_components/yandex_transport.markdown +++ b/source/_components/yandex_transport.markdown @@ -27,9 +27,6 @@ To activate Yandex Transport, add the following lines to your `configuration.yam sensor: - platform: yandex_tranport stop_id: YOUR_STOP_ID - routes: #optionaly - - 916 - - 118 ``` {% configuration %} @@ -48,4 +45,38 @@ name: type: string {% endconfiguration %} -Data provided by https://maps.yandex.ru \ No newline at end of file +## Full configuration example + +The configuration sample below shows how an entry can look like: + +```yaml +# Example configuration.yaml entry +sensor: + - platform: yandex_transport + name: Bus_to_subway + stop_id: 9639579 + routes: + - 63 + - 179 + - 179к + - 154 + - 591 + - 677к +``` + +## Options For Entities +You can configure view information about next bus using lovelace card. +To enable displaying the relative time in your `default_vew` add the following lines: +```yaml +# Example default_view entry +title: Home Assistant +views: + cards: + - entities: + - entity: sensor.yandex_transport + format: relative + type: entities + path: default_view +``` + +Data provided by https://maps.yandex.ru From a916fb4bab53aef5805faabee3bb5f9afdaafc5e Mon Sep 17 00:00:00 2001 From: Askarov Rishat Date: Mon, 16 Sep 2019 10:04:58 +0300 Subject: [PATCH 3/6] removing redirect_from section --- source/_components/yandex_transport.markdown | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/_components/yandex_transport.markdown b/source/_components/yandex_transport.markdown index 8f94f2ce5cff..615533c6e940 100644 --- a/source/_components/yandex_transport.markdown +++ b/source/_components/yandex_transport.markdown @@ -5,8 +5,6 @@ logo: yandex.png ha_category: - Transport ha_release: 0.99 -redirect_from: - - /components/sensor.yandex_tranport/ --- The `yandex_tranport` sensor platform uses [Yandex Maps](https://maps.yandex.ru/) it will give you the time until the next departure time from a bus/tramway/etc stop. From 54853f858293b4d6ef92ac8f837e57036682e268 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Mon, 16 Sep 2019 15:13:18 +0200 Subject: [PATCH 4/6] :pencil2: Tweak --- source/_components/yandex_transport.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/_components/yandex_transport.markdown b/source/_components/yandex_transport.markdown index 615533c6e940..c3dfae6e3488 100644 --- a/source/_components/yandex_transport.markdown +++ b/source/_components/yandex_transport.markdown @@ -3,8 +3,9 @@ title: "Yandex transport" description: "Instructions on how to setup Yandex transport with Home Assistant." logo: yandex.png ha_category: + - Sensor - Transport -ha_release: 0.99 +ha_release: "0.100" --- The `yandex_tranport` sensor platform uses [Yandex Maps](https://maps.yandex.ru/) it will give you the time until the next departure time from a bus/tramway/etc stop. @@ -63,8 +64,10 @@ sensor: ``` ## Options For Entities + You can configure view information about next bus using lovelace card. To enable displaying the relative time in your `default_vew` add the following lines: + ```yaml # Example default_view entry title: Home Assistant From 6f6e585fb683c83a28c90776d44f59c3848c7ecc Mon Sep 17 00:00:00 2001 From: Rishat Askarov Date: Fri, 20 Sep 2019 01:28:30 +0300 Subject: [PATCH 5/6] fixed information about the tracking of the specific routes --- source/_components/yandex_transport.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/yandex_transport.markdown b/source/_components/yandex_transport.markdown index 95d84bf2632d..f678a837d6f1 100644 --- a/source/_components/yandex_transport.markdown +++ b/source/_components/yandex_transport.markdown @@ -16,7 +16,7 @@ The [Yandex Maps](https://maps.yandex.ru/) website can help to determine the id https://yandex.ru/maps/213/moscow/?ll=37.722565%2C55.806662&masstransit%5BstopId%5D=stop__9642962&mode=masstransit&z=16.52 where stop id is: **9642962** -if you want to look only specific routes, you can add them in routes section. +If you want to track only specific routes, you can add them in the routes section. ## Configuration From e832fd0e228523c3e96b7e2994c1583c3bee07dd Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 21 Sep 2019 22:11:24 +0200 Subject: [PATCH 6/6] :pencil2: Tweaks --- source/_components/yandex_transport.markdown | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/_components/yandex_transport.markdown b/source/_components/yandex_transport.markdown index c54e2d5f66c2..f3e5c2071960 100644 --- a/source/_components/yandex_transport.markdown +++ b/source/_components/yandex_transport.markdown @@ -1,6 +1,6 @@ --- title: "Yandex transport" -description: "Instructions on how to setup Yandex transport with Home Assistant." +description: "Instructions on how to set up Yandex transport with Home Assistant." logo: yandex.png ha_category: - Sensor @@ -10,10 +10,11 @@ ha_release: "0.100" The `yandex_tranport` sensor platform uses [Yandex Maps](https://maps.yandex.ru/) it will give you the time until the next departure time from a bus/tramway/etc stop. -The [Yandex Maps](https://maps.yandex.ru/) website can help to determine the id of your bus stop. You can select bus stop by clicking on the map, and look to the url: +The [Yandex Maps](https://maps.yandex.ru/) website can help to determine the id of your bus stop. You can select a bus stop by clicking on the map, and look to the URL: -https://yandex.ru/maps/213/moscow/?ll=37.722565%2C55.806662&masstransit%5BstopId%5D=stop__9642962&mode=masstransit&z=16.52 -where stop id is: **9642962** +`https://yandex.ru/maps/213/moscow/?ll=37.722565%2C55.806662&masstransit%5BstopId%5D=stop__9642962&mode=masstransit&z=16.52` + +Where stop id is: **9642962** If you want to track only specific routes, you can add them in the routes section. @@ -34,7 +35,7 @@ stop_id: required: true type: string routes: - description: A list of a specific bus/tramway/etc routes at the stop. This is the same as the bus number, e.g., `83`. If the routes with letters contain cyrillic symbols, so write them to configuration.yaml BY cyrillic. + description: "A list of a specific bus, tramway, etc routes at the stop. This is the same as the bus number, e.g., `83`. If the routes with letters contain Cyrillic symbols, so write them to `configuration.yaml` in Cyrillic." required: false type: list name: @@ -65,7 +66,7 @@ sensor: ## Options For Entities -You can configure view information about next bus using lovelace card. +You can configure view information about the next bus using Lovelace card. To enable displaying the relative time in your `default_vew` add the following lines: ```yaml