homebridge-http-webhooks icon indicating copy to clipboard operation
homebridge-http-webhooks copied to clipboard

Keys case sensitive

Open TeslaOwnerTips opened this issue 3 years ago • 3 comments

When i use the api I get {"success":true,"currentState":"","targetState":"0"} {"success":true,"CurrentPosition":"1","TargetPosition":"1"} But when I change the case I get {"success":true}

TeslaOwnerTips avatar Jan 08 '22 15:01 TeslaOwnerTips

What url did you call and what did you want to achive? From code I can tell, that if you call the url without currentstate and targetstate, the the current status will be returned as information and nothing happens to the accessory. If you send one of them, the corresponding value in the accessory will be changed and you will get success: true.

benzman81 avatar Jan 13 '22 10:01 benzman81

It the case. Capitalization documented vs actual. Documented has the first character lowercase but actually needs to be upper case in the url sent.

So I first used the key name as provided in the document. The response was

{"success":true,"currentState":"","targetState":"0"}

I then changed the key capitalization to be currentState and targetState and got back

{"success":true}

I think the documentation needs to change?

TeslaOwnerTips avatar Jan 13 '22 14:01 TeslaOwnerTips

Could you please post what url you call and what you want to achive and what is actually and expected behavior? Just to make it better understandable for me :-)

benzman81 avatar Jan 14 '22 09:01 benzman81