djbulsink / panasonic_ac

Panasonic Comfort Cloud HA component
30 stars 16 forks source link

Fix: An exception was thrown when hassio called for an update and token was expired #1

Closed shyne99 closed 5 years ago

shyne99 commented 5 years ago

Hello,

I've noticed a bug where hassio throw an Exception on update when the token was expired or not valid anymore (eg. I logged in from the phone). Basically i catch the exception and call login again before retrying to get the status of the device. The problem with that is that, since hassio calls this function a lot, it appears that you get more often disconnected from the mobile app, and before this PR, you get disconnected only f you send an action from hassio I don't think that this is a big issue since people that use this component will rarely use the panasonic app for controlling the AC, they'll do it from hassio, but it has to be taken into consideration in your choice to merge this or not.

Thank you

djbulsink commented 5 years ago

Hi @shyne99,

Thanks for this fix. I'll merge it.

Cheers, DJ