Skip to content

v0.1.09 fix prefix

Choose a tag to compare

@heatvent heatvent released this 27 Jul 20:29
· 21 commits to main since this release
d3194c4

def send_data(self, command):
"""Send data to Control4 Amp."""
# Adjusted sequence initialization and formatting
self.sequence = (self.sequence % 99) + 1 # Wrap around at 99 and start at 01
data = f'0gha{self.sequence:02d} {command}\r\n'
if self.transport:
self.transport.sendto(data.encode(), (self.ip, self.port))
_LOGGER.info("Sent command: %s to %s:%s", data, self.ip, self.port)