peetereczek / ztm

Home Assistant (hass.io) custom component for Warsaw public transport
MIT License
12 stars 2 forks source link

The mdi:icon does not take into account the type of transport (always resolves as mdi:tram) #23

Open nigras opened 3 days ago

nigras commented 3 days ago

The mdi:icon does not take into account the type of transport (always resolves as mdi:tram) in the attributes. Example configuration:

platform: ztm
  name: ztm_schedule
  api_key: *******
  lines:
     - number: 709
       stop_id: 3014
       stop_number: "01"    
     - number: M1
       stop_id: 3601
       stop_number: "01"    
     - number: 24
       stop_id: 5068
       stop_number: "03"
     - number: 23
       stop_id: 5068
       stop_number: "03"

Result seen in Developer Tools - > States -> Filter: sensor.ztm_schedule_709_from_3014_01

departures: 0, 20, 40
direction: PKP Piaseczno, PKP Piaseczno, PKP Piaseczno
attribution: Data provided by Miasto Stołeczne Warszawa api.um.warszawa.pl on 2024-10-29
unit_of_measurement: min
icon: mdi:tram
friendly_name: ztm_schedule 709 from 3014 01

Plugin version:

auto_update: false
installed_version: 0.2.2
in_progress: false
latest_version: 0.2.2
release_summary: null
release_url: https://github.com/peetereczek/ztm/releases/0.2.2
skipped_version: null
title: null
entity_picture: https://brands.home-assistant.io/_/ztm/icon.png
friendly_name: Warsaw ZTM Information update
supported_features: 23

HA version: 2024.10.4

nigras commented 3 days ago

It's looks like the code in version installed from HACS is older than code on github, but version number is newer - maybe new release is needed - the last one is the old one: https://github.com/peetereczek/ztm/releases/tag/0.2.2