pantherale0 / ha-fuelprices

A generic and extensible integration with pyfuelprices to retrieve local (or remote) fuel price data.
MIT License
16 stars 2 forks source link

TypeError: '<' not supported between instances of 'str' and 'int' #22

Closed modem7 closed 1 month ago

modem7 commented 1 month ago

System Health details

System Information

version core-2024.7.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.33-haos
arch x86_64
timezone Europe/London
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4963 Installed Version | 1.34.0 Stage | running Available Repositories | 1459 Downloaded Repositories | 50
AccuWeather can_reach_server | ok -- | -- remaining_requests | 7
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | 18 August 2024 at 01:00 relayer_connected | true relayer_region | eu-central-1 remote_enabled | false remote_connected | false alexa_enabled | true google_enabled | true remote_server | eu-central-1-9.ui.nabu.casa certificate_status | ready instance_id | e6a004e587074017969916cabb52264f can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.4 -- | -- update_channel | stable supervisor_version | supervisor-2024.06.2 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 30.8 GB disk_used | 17.2 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | kvm board | ova supervisor_api | ok version_api | ok installed_addons | ESPHome (2024.7.2), Crowdsec (1.6.2), Crowdsec Firewall Bouncer (v0.0.28), Advanced SSH & Web Terminal (18.0.0), File editor (5.8.0), Simple Scheduler (2.5), Mosquitto broker (6.4.1), Cloudflared (5.1.15), Zigbee2MQTT (1.39.0-1), openWakeWord (1.10.0)
Dashboards dashboards | 4 -- | -- resources | 29 views | 7 mode | storage
Recorder oldest_recorder_run | 20 July 2024 at 00:00 -- | -- current_recorder_run | 29 July 2024 at 16:59 estimated_db_size | 853.60 MiB database_engine | sqlite database_version | 3.45.3
Spotify api_endpoint_reachable | ok -- | --

Checklist

Describe the issue

Latest update (2024.7.1), not getting any entities.

Reproduction steps

  1. Update to latest version
  2. Error

Debug logs

2024-07-30 01:39:04.179 DEBUG (MainThread) [custom_components.fuel_prices] Unloading config entry 01J40H287THSSSZ4B5C2BCMCD3
2024-07-30 01:39:04.352 DEBUG (MainThread) [custom_components.fuel_prices.coordinator] Finished fetching 01J40H287THSSSZ4B5C2BCMCD3 data in 0.173 seconds (success: True)
2024-07-30 01:39:04.353 DEBUG (MainThread) [custom_components.fuel_prices.sensor] Registering entities for area Home
2024-07-30 01:39:04.613 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up fuel_prices platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/fuel_prices/sensor.py", line 37, in async_setup_entry
    for station in await entry.runtime_data.coordinator.api.find_fuel_locations_from_point(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyfuelprices/__init__.py", line 66, in find_fuel_locations_from_point
    locations.extend(await self.configured_sources[src].search_sites(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyfuelprices/sources/__init__.py", line 79, in search_sites
    if site.lat < 90:
       ^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'str' and 'int'

Diagnostics dump

No response

pantherale0 commented 1 month ago

Hi,

If you can try 2024.7.2 that would be great.

Thanks :slightly_smiling_face:

modem7 commented 1 month ago

Hi,

If you can try 2024.7.2 that would be great.

Thanks đŸ™‚

All working as expected! Thanks for the quick turnaround!