Skip to content

Commit

Permalink
Merge pull request #30 from jdemel/fix-head-tail-formatter
Browse files Browse the repository at this point in the history
intertechno: Fix head and tail formatter
  • Loading branch information
d-Rickyy-b authored Jan 29, 2024
2 parents 1ae215c + cffa72b commit d7b55ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyBrematic/gateways/intertechno_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def __init__(self, ip, port=49880):
# For the Intertechno GWY 433 the parameters look like that:
# head: "0,0,<repeat>,<pause>,<tune>,<baud>"
# tail: "<txversion>,<speed>"
self.head_format = "0,0,{0},{1},{2},{3}"
self.tail_format = "{0},{1}"
self.head_format = "0,0,{0},{1},{2},{3},0"
self.tail_format = "{0},{1},0"

def build_udp_payload(self, device, action):
head = self.get_head(device.repeat, device.pause_IT, device.tune, device.baud_IT)
Expand Down
2 changes: 1 addition & 1 deletion pyBrematic/gateways/tests/intertechno_gateway_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_build_udp_payload(self):
device.get_signal = get_signal_mock

payload = self.gw.build_udp_payload(device, Action.ON)
self.assertEqual("0,0,2345,111,557,91919,A,SIGNAL-A,B,B,A-SIGNAL,C,1,432", payload)
self.assertEqual("0,0,2345,111,557,91919,0,A,SIGNAL-A,B,B,A-SIGNAL,C,1,432,0", payload)
get_signal_mock.assert_called_once_with(Action.ON)

def test_get_head(self):
Expand Down

0 comments on commit d7b55ed

Please sign in to comment.