mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2026-04-18 13:03:31 +00:00
add a delimiter end of request string in _set_rt
fixes bug if more than a single command in request packet.
removed [{self.index}] from apply string. (duplicates)
This commit is contained in:
@@ -91,6 +91,8 @@ class IRemote(metaclass=ABCMeta):
|
||||
cmd = f"{self.identifier}.{param}"
|
||||
if cmd in self._remote.cache:
|
||||
return self._remote.cache.pop(cmd)
|
||||
if self._remote.sync:
|
||||
self._remote.clear_dirty()
|
||||
|
||||
def setter(self, param, val):
|
||||
"""Sends a string request RT packet."""
|
||||
@@ -120,8 +122,8 @@ class IRemote(metaclass=ABCMeta):
|
||||
if isinstance(val, bool):
|
||||
val = 1 if val else 0
|
||||
|
||||
self._remote.cache[f"{self.identifier}[{self.index}].{attr}"] = val
|
||||
script += f"{self.identifier}[{self.index}].{attr}={val};"
|
||||
self._remote.cache[f"{self.identifier}.{attr}"] = val
|
||||
script += f"{self.identifier}.{attr}={val};"
|
||||
|
||||
self._remote.sendtext(script)
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user