Skip to content

Commit

Permalink
Yet another fix for the dmx post data payload conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
ylabonte committed Aug 19, 2024
1 parent f7f3000 commit 6954802
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ output), there is a really simple way to support me:

## Release Notes

### v1.4.4 (2024-08-20)
* Yet another fix for the dmx post data payload conversion.

### v1.4.3 (2024-08-20)
* Fix new `async_get_raw_dmx()` and `async_get_dmx()` methods.
* Fix new `GetDmxData.post_data` property.
Expand Down
2 changes: 1 addition & 1 deletion src/proconip/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ async def async_set_dmx(
return await async_post_usrcfg_cgi(
client_session=client_session,
config=config,
payload="&".join(f"{k}={v}" for k, v in dmx_states.post_data),
payload="&".join([f"{k}={v}" for k, v in dmx_states.post_data.items()]),
)


Expand Down
2 changes: 2 additions & 0 deletions tests/test_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ def test_post_data_property(self):
self.assertEqual(post_data["CH1_8"], "0,10,20,30,40,50,60,70")
self.assertEqual(post_data["CH9_16"], "80,90,100,110,120,130,140,150")
self.assertEqual(post_data["DMX512"], "1")
payload = "&".join([f"{k}={v}" for k, v in post_data.items()])
self.assertEqual(payload, "TYPE=0&LEN=16&CH1_8=0,10,20,30,40,50,60,70&CH9_16=80,90,100,110,120,130,140,150&DMX512=1")

def test_string_conversion(self):
"""Test the string conversion method of the GetDmxData class."""
Expand Down

0 comments on commit 6954802

Please sign in to comment.