custom-components / zaptec

zaptec charger custom component for home assistant
MIT License
67 stars 20 forks source link

Attempt to decode JSON with unexpected mimetype #18

Closed freeverbier closed 2 years ago

freeverbier commented 2 years ago

Type of charger : Zaptec Pro Role into the portal : User / Owner / Service

Source: custom_components/zaptec/api.py:407
Integration: zaptec (docs)
First occurred: 22:28:32 (1 occurrences)
Last logged: 22:28:32

Could not get info from [https://api.zaptec.com/api/circuits/{self.id}/](https://api.zaptec.com/api/circuits/%7Bself.id%7D/): 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https:// api.zaptec.com/api/circuits/%7Bself.id%7D/')
Hellowlol commented 2 years ago

I have no idea why this is happening. Can you run the api.py script manually and post the output?

freeverbier commented 2 years ago

How can i do that ? I run the HA OS and with the SSH access i don't have access to python or python3.

I saw in the attributes of my entity all parameters i need

image
Hellowlol commented 2 years ago

You can run it from any computer that has Python installed. But the simplest option would be to turn on debugg logging. Maybe I get what i need from that