goooroooX / ZipatoPy

Python library to interact with Zipato smarthome controllers
Apache License 2.0
3 stars 2 forks source link

set_attributes_config() & set_attributes_value() should do a PUT instead of POST #1

Closed TheBazeman closed 5 years ago

TheBazeman commented 5 years ago

Hi,

Took me a couple of hours but figured it out when wanted to set a value to a device. The {"value" : ""} json is not sent along to the Zipabox when doing a POST. Changed it to a PUT and it works offcourse. Can you change the code?

I have tested it with set_attributes_value() and I am assuming it should be changed on set_attributes_config() too, so please verify.

Thanks a lot and keep up the good work,

Kind regards and have a nice weekend, -Bas

PS: Local API does return the Attribute name but you should use ["attributeName"] instead of ["name"], maybe you want to have a look to that also.

goooroooX commented 5 years ago

Thank you for information, I'll update code.

goooroooX commented 5 years ago

fixed.