yyrkoon94 / lovelace-idf-mobilite

Lovelace Card for IDF Mobilité (Bus, Métro, RER)
21 stars 6 forks source link

Data issue #33

Closed ziram78 closed 1 month ago

ziram78 commented 3 months ago

Hello it seems to me that I've done the configuration correctly, on the PRIM interface I see that I'm generating requests but my lovelace card remains empty.

image

yyrkoon94 commented 3 months ago

Hi @ziram78,

My first test is that your stop (47916) get no data from PRIM API. Let me know where is this stop so I can check more precisely what happen.

ziram78 commented 3 months ago

Hi @yyrkoon94, thank you for your keep reply.

I tried to change it by the Saint Lazare (71370) rail station and nothing works. and where i live andresy (65542)

image

Best,

yyrkoon94 commented 3 months ago

Hi @ziram78,

Found your problem ;) You forget to add (in your configuration.yaml): json_attributes:

image

ziram78 commented 3 months ago

Yes great thank you for your help and for the work you have done.

Last questions :

  1. can you explain me thoses lines

    json_attributes:

    • Siri
  2. what is unique_id

  3. if i want to add other sensors :

I just have to copy past and change the Stoparea ID ?

yyrkoon94 commented 3 months ago

Cool ! So : 1/ It's use from REST sensor to get a specific node from the json as an attribute of the sensor. So the first test I made is to check if I have an attribute called "Siri". So without that, the card will not work 2/ unique_id is not mandatory but is useful if you want to modify the sensor from the HA interface (changing name, ...). It's a UUID that you can generate here for example : https://www.uuidgenerator.net/version4 3/ If you want to add more line on different stops just create a second sensor (duplicate everything) with a different name and different unique_id and of course a different MonitoringRef (for exemple, for debugging I have more than 10 different lines ;)

Enjoy !

ziram78 commented 3 months ago

Yes great, it works nicely. My last question is it possible to retreive the dock.

yyrkoon94 commented 3 months ago

Hmmm I don't think so.