ofalvai / home-assistant-szep-kartya

Custom component for tracking the balance of an OTP SZÉP Kártya
19 stars 5 forks source link

Error while setting up szep_kartya platform for sensor #12

Closed elmerenges closed 1 year ago

elmerenges commented 1 year ago

Egy ideje nem működik a szenzor. Ez a hibaüzenet:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/szep_kartya/sensor.py", line 48, in setup_platform
    sensor.update()
  File "/config/custom_components/szep_kartya/sensor.py", line 95, in update
    self.fetch_balance()
  File "/config/custom_components/szep_kartya/sensor.py", line 122, in fetch_balance
    self.balance_vendeglatas = parse_balance(response_json[1]['szamla_osszeg7'])
TypeError: string indices must be integers
elmerenges commented 1 year ago

Rájöttem, én hibáztam, zárom ezt az issue-t.