mbillow / ha-chargepoint

Home Assistant ChargePoint EV Charger Integration
MIT License
44 stars 6 forks source link

Failed to setup error still coming after latest update #9

Closed uditb-del closed 2 years ago

uditb-del commented 2 years ago

I updated to latest release and still getting the "Failed to setup" error. Here's what I see in the log. Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 339, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/chargepoint/init.py", line 107, in async_setup_entry client: ChargePoint = await hass.async_add_executor_job( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) File "/usr/local/lib/python3.9/site-packages/python_chargepoint/client.py", line 84, in init account: ChargePointAccount = self.get_account() File "/usr/local/lib/python3.9/site-packages/python_chargepoint/client.py", line 42, in check_login return func(args, **kwargs) File "/usr/local/lib/python3.9/site-packages/python_chargepoint/client.py", line 218, in get_account return ChargePointAccount.from_json(account) File "/usr/local/lib/python3.9/site-packages/python_chargepoint/types.py", line 88, in from_json user = ChargePointUser.from_json(json["user"]) File "/usr/local/lib/python3.9/site-packages/python_chargepoint/types.py", line 53, in from_json phone=json["phone"], KeyError: 'phone'

mbillow commented 2 years ago

Looks like a continuation of #8. I’ll make the phone field optional as well.

mbillow commented 2 years ago

Can you try updating to version 0.3.0 and giving this another go?

uditb-del commented 2 years ago

Just tried it, works perfectly. Thanks!