Hiya
They look totally normal. Expired token maybe??
Super cool of you to help!
It was my first guest⌠if you restart the HA it will force to renew the token. May you test this please? I put code in there to renew the token using a API call to should do that. Perhaps I should change to just re-authenticate again.
sadly, a restart of HA hasnât changed anything. Still just get ânobodyâ and the same error in the logs. Interesting, though, as I guess ultimately this is useful debugging info?
may you show your shift? Thereâs another thing to check: who is on duty? I didnt payed too much attention to unicode/UTF-8 strings, so if the one on duty has accented letters in the name could be a problem.
Guess it could be the âholidayâ state? But even yesterday the âtodayâ sensor was showing ânobodyâ so I suspect itâs not that.
Hi,
May you run this code and send the error that it should produce? Edit the file to change your humanity credentials and run it as âpython humanitydebug.pyâ. Perhaps you will have to run âpip install requestsâ before as the requests library is needed.
yes⌠âholidayâ may be the problem. I will need to add code to deal with this kind of thing.
thanks for this!
I did a quick fix and commited to my github. May you update/try the new code?
Thanks for this!
Now it says:
2019-06-21 19:09:31 ERROR (SyncWorker_10) [custom_components.humanity.sensor] Error when calling humanity to update data
2019-06-21 19:09:33 ERROR (SyncWorker_2) [custom_components.humanity.sensor] Error when calling humanity to update data
My instinct is that itâs a token issue rather than a holiday issue, but that the holiday issue would probably have caused problems at a later date anyway!
Hi,
Please download and run again the humanitydebug.py code. I dont think the problem is the token as thereâs another message for when the token/login is wrong.
hmmm, miraculously, the Humanity implementation has started working again?!
I use a âget_shiftsâ API call to retrieve the shifts from the next 3 days. I pass this response to a function to split it on today/tomorrow shifts. Something was wrong while trying to parse/split that response. Looking at your shift picture again get me wondering about that âEmpty Shiftsâ line. I will update the code and put more checks on it, but Iâm really curious about what humanity was returning that broke that split function :-(.
Hi pal,
Well, I wonât disappear! When if/it âbreaksâ again I will happily post again so we can try to crack it?
EDIT: or I can add an âempty shiftâ for Tuesday, say?
Thanks!!
Have sent a paste to the JSON output of a failed call to you as a PM. Names are anonymised, but even so!