Add set_dps to set multiple datapoints
This commit is contained in:
1 parent
44db913514
commit
47d2900a2c
1 file changed
+4
@@ -438,6 +438,10 @@ class TuyaProtocol(asyncio.Protocol):
|
|||||||
"""
|
"""
|
||||||
return await self.exchange(SET, {str(dp_index): value})
|
return await self.exchange(SET, {str(dp_index): value})
|
||||||
|
|
||||||
|
async def set_dps(self, value, dps):
|
||||||
|
"""Set values for a set of datapoints."""
|
||||||
|
return await self.exchange(SET, dps)
|
||||||
|
|
||||||
async def detect_available_dps(self):
|
async def detect_available_dps(self):
|
||||||
"""Return which datapoints are supported by the device."""
|
"""Return which datapoints are supported by the device."""
|
||||||
# type_0d devices need a sort of bruteforce querying in order to detect the
|
# type_0d devices need a sort of bruteforce querying in order to detect the
|
||||||
|
|||||||
Reference in new issue
Block a user