Closed deveth0 closed 3 years ago
I first had the issue with Templates but it seems to be consistent for other commands like Timers.
Setting a command like this:
- command: Timer16 value: '{"Enable":1,"Mode":0,"Time":"11:44","Window":0,"Days":"1111111","Repeat":1,"Output":1,"Action":3}'
results in this request (response: invalid json):
/cm?user=&password=&cmnd=Timer16+%7B%27Enable%27%3A+1%2C+%27Mode%27%3A+0%2C+%27Time%27%3A+%2711%3A44%27%2C+%27Window%27%3A+0%2C+%27Days%27%3A+%271111111%27%2C+%27Repeat%27%3A+1%2C+%27Output%27%3A+1%2C+%27Action%27%3A+3%7D
This is due to the fact, that instead of " only ' is used:
"
'
Timer16 {'Enable': 1, 'Mode': 0, 'Time': '11:44', 'Window': 0, 'Days': '1111111', 'Repeat': 1, 'Output': 1, 'Action': 3}
It does not matter, how you escape the value, the followin also fails:
- command: Timer16 value: "{'Enable':1,'Mode':0,'Time':'11:44','Window':0,'Days':'1111111','Repeat':1,'Output':1,'Action':3}"
Also the documented value for Template does not seem to work.
@deveth0 merged #22 so this is fixed.
I first had the issue with Templates but it seems to be consistent for other commands like Timers.
Setting a command like this:
results in this request (response: invalid json):
This is due to the fact, that instead of
"
only'
is used:It does not matter, how you escape the value, the followin also fails:
Also the documented value for Template does not seem to work.