home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.72k stars 30.45k forks source link

Error on device update (KeyError: 'operatorName') - Please update Nederlandse Spoorwegen to 3.1.0 #86922

Closed TheSander562 closed 1 year ago

TheSander562 commented 1 year ago

The problem

Dear,

Could you update the plugin/component to 3.1.0 of Nederlandse Spoorwegen: https://github.com/aquatix/ns-api/releases/tag/v3.1.0 https://github.com/aquatix/ns-api/issues/32

This fixes the issue i got now.

Thank you. Kind regards. Sander Lambrechts

What version of Home Assistant Core has the issue?

2023.1.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Nederlandse Spoorwegen

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nederlandse_spoorwegen/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-01-29 23:29:59.785 ERROR (MainThread) [homeassistant.components.sensor] nederlandse_spoorwegen: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 503, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 729, in async_device_update
    await task
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 192, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/nederlandse_spoorwegen/sensor.py", line 243, in update
    self._trips = self._nsapi.get_trips(
  File "/usr/local/lib/python3.10/site-packages/ns_api.py", line 928, in get_trips
    return self.parse_trips(raw_trips, requested_time)
  File "/usr/local/lib/python3.10/site-packages/ns_api.py", line 839, in parse_trips
    newtrip = Trip(trip, requested_time)
  File "/usr/local/lib/python3.10/site-packages/ns_api.py", line 608, in __init__
    trip_part = TripSubpart(part)
  File "/usr/local/lib/python3.10/site-packages/ns_api.py", line 442, in __init__
    self.transporter = part_dict['product']['operatorName']
KeyError: 'operatorName'

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @yarmom, mind taking a look at this issue as it has been labeled with an integration (nederlandse_spoorwegen) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `nederlandse_spoorwegen` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign nederlandse_spoorwegen` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


nederlandse_spoorwegen documentation nederlandse_spoorwegen source (message by IssueLinks)

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.