From cf2b028e6916bcebbd08bdc394c02bd6387d8680 Mon Sep 17 00:00:00 2001 From: Kenneth Lavrsen Date: Tue, 27 Aug 2019 18:46:39 +0200 Subject: [PATCH] Document 'name' config parameter in rejseplanen (#10243) * Document 'name' config parameter in rejseplanen Document the undocumented but fully working name config. This is an optional config but essential to know to define more than one instance of the rejseplanen sensor and getting a predictable result. Otherwise the sensor name defaults to sensor.next_departure_# and the numbers can swap around after an HA restart * An example where policy and common sense clash Done as suggested though I do not agree * :pencil2: Tweak * Adjust default * Fix sample --- source/_components/rejseplanen.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/_components/rejseplanen.markdown b/source/_components/rejseplanen.markdown index 03bee9fefbc..c152d4e9884 100644 --- a/source/_components/rejseplanen.markdown +++ b/source/_components/rejseplanen.markdown @@ -53,6 +53,11 @@ stop_id: description: The ID of the public transport stop. required: true type: string +name: + description: "The name of the sensor. Entity ID for the sensor will be created based on this name. E.g., Glostrup St becomes `sensor.glostrup_st`. It's optional but recommended if you define more than one sensor." + required: false + type: string + default: "Next departure" route: description: List of route names. required: false @@ -105,6 +110,7 @@ A more extensive example on how to use this sensor: # Example configuration.yaml entry sensor: - platform: rejseplanen + name: 'Elmegade 350S' stop_id: '000045740' route: 'Bus 350S' direction: