upsert / lutron-caseta-pro

Custom Home Assistant Component for Lutron Caseta Smart Bridge PRO / RA2 Select

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting failed to call service error when trying to configure component.

ghurty opened this issue · comments

I am trying to configure the component. When I paste my integration report I get the following error:
failed to call service configurator/configure expected value line 1 column 1 (char 0).

Any suggestions?

Thank you

Possible copy/paste issue?

I have gone back and reconfigured the component on the latest Home Assistant 2020.12.1 and confirmed it is still working as expected with the configurator.

I am getting the same problem with the same release that you tested with.

I just found the problem: At least in the case of the IOS Lutron app, it indents the JSON file with causes errors with Python's JSON parser. If you remove the leading spaces, it parses fine.

Are you sending it to yourself via email and copying it after you receive the email, or are you copying it from the App UI?

I've not updated recently but I've never had any issues using the real email I receive.

In case it's helpful, I do no use Apple (iOS) mail either, only Gmail but it is configured on my iPhone. So the Lutron app uses the default mail provider it seems because the sent mail from the Lutron app appears in my sent folder of Gmail, and in my inbox because I sent it to myself.

Try copy/pasting into Notepad (if you use Windows) or Notepad++ which can help show any invalid characters...another option might be to run it through an online JSON formatter first to sanitize it...

Are the leading spaces before the first opening bracket of the JSON or are they inside individual values? A trim command could be added that would remove leading and trailing whitespace from the content entered in the configurator dialog.