FaserF / ha-deutschebahn

Unofficial HA DB Integration, due to removal as of Home Assistant 2022.11
Apache License 2.0
40 stars 7 forks source link

Cannot setup sensor again after HA update from 9.7 to 10.5 #7

Closed Pirol62 closed 1 year ago

Pirol62 commented 1 year ago

The problem

Configuration error reported by HA

What version of Home Assistant Core has the issue?

2022.10.5

What version of DeutscheBahn Integration has the issue?

2.0.3

What type of installation are you running?

Home Assistant OS

Example YAML snippet

- platform: deutschebahn
  from: "Meerbusch-Osterath"
  to: "Köln Hbf"
  only_direct: true
- platform: deutschebahn
  from: "Meerbusch-Osterath"
  to: "Düsseldorf Hbf"
  only_direct: true
- platform: deutschebahn
  from: "Meerbusch-Osterath"
  to: "Krefeld Hbf"
  only_direct: true

Anything in the logs that might be useful for us?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/hassio/__init__.py:705
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 08:38:44 (1 occurrences)
Last logged: 08:38:44

[281472025085216] The system cannot restart because the configuration is not valid: Invalid config for [sensor.deutschebahn]: [from] is an invalid option for [sensor.deutschebahn]. Check: sensor.deutschebahn->from. (See ?, line ?). Invalid config for [sensor.deutschebahn]: [from] is an invalid option for [sensor.deutschebahn]. Check: sensor.deutschebahn->from. (See ?, line ?). Invalid config for [sensor.deutschebahn]: [from] is an invalid option for [sensor.deutschebahn]. Check: sensor.deutschebahn->from. (See ?, line ?).
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 202, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 705, in async_handle_core_service
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Invalid config for [sensor.deutschebahn]: [from] is an invalid option for [sensor.deutschebahn]. Check: sensor.deutschebahn->from. (See ?, line ?). 
Invalid config for [sensor.deutschebahn]: [from] is an invalid option for [sensor.deutschebahn]. Check: sensor.deutschebahn->from. (See ?, line ?). 
Invalid config for [sensor.deutschebahn]: [from] is an invalid option for [sensor.deutschebahn]. Check: sensor.deutschebahn->from. (See ?, line ?).

Additional information

No response

FaserF commented 1 year ago

Hi, Please read the breaking changes from the changelog here: https://github.com/FaserF/ha-deutschebahn/releases/tag/2.0.1

You will have to set up the integration now from the UI instead of the configuration.yaml file. Please have a look here on how to do it: https://github.com/FaserF/ha-deutschebahn#migrate-from-the-old-official-ha-integration-or-from-this-v1x-to-this-2x-version

Pirol62 commented 1 year ago

Oh sorry, have overseen this. Thanks for the quick support.