Uk_transport - no sensor

Ive just added a train route with the uk_transport integration but after rebooting HA i dont find any sensors appearing. I also didnt see anything in the logs and config is at least valid.

sensor:
  - platform: uk_transport
    app_id: 80****d4
    app_key: bc655************************36c34
    scan_interval: 300
    queries:
      - mode: train
        origin: WYB
        destination: WAT

Most integrations ive seen have also a enable code line like below but no mention in the github.

uk_transport:

I can’t see anything wrong with your code
Can you confirm that you only have 1 occurrence of sensor: in your configuration.yaml?
You’ve also set a scan_interval of 5 min, so you may have to wait for 5 min before seeing any results…

I feel like you may have solved my issue just reading that. I have “sensor:” littered all over my config yaml file.

Up until now i never had an issue with it, i also wasnt sure if everything should be listed under one sensor: heading or each type of sensor is separate as i have done.

Do i need to have all my sensors listed under one the line sensor: so it appears only once?

yup. All sensors to be listed under the one sensor: header.
Same for binary_sensor, input_boolean etc…

Sadly didnt seem to help. I dont need to add anything else to the config right, just the sensor as above?

I did test the station codes get GET on the website so i know its a valid route.

Solved :slight_smile: I found another sensor below. Thanks!!

1 Like