cnk700i / havcs

Home Assistant Voice Control Skill
https://ljr.im/articles/plugins-havcs-edible-instructions/
Apache License 2.0
311 stars 97 forks source link

fix: adapt new version of homeassistant with jwt version 2.x.x #47

Open moonsn opened 2 years ago

moonsn commented 2 years ago

homeassistant updated jwt module to version 2 (#55911) , this jwt version deprecated jwt.decode verify_expiration and require explicit algorithms parameter (changelog). the deprecated may cause HAVCS update access_token's expiration failed.

this pr fix this problem and make it works on jwt version 1 and version 2 both by check the jwt version and choice appropriate decode method.

dscao commented 2 years ago

Thank you, After replacing the file “util.py”, it was finally normal for ha2022.3。