Merge branch 'master' into offline_init

This commit is contained in:
rospogrigio
2023-09-12 13:28:45 +02:00
committed by GitHub
5 changed files with 79 additions and 7 deletions

View File

@@ -817,7 +817,7 @@ class TuyaProtocol(asyncio.Protocol, ContextualLogger):
Args: Args:
dps([int]): list of dps to update, default=detected&whitelisted dps([int]): list of dps to update, default=detected&whitelisted
""" """
if self.version in [3.2, 3.3]: # 3.2 behaves like 3.3 with type_0d if self.version in [3.2, 3.3, 3.4]: # 3.2 behaves like 3.3 with type_0d
if dps is None: if dps is None:
if not self.dps_cache: if not self.dps_cache:
await self.detect_available_dps() await self.detect_available_dps()

View File

@@ -198,5 +198,29 @@
} }
} }
}, },
"services": {
"reload": {
"name": "Reload",
"description": "Reload localtuya and reconnect to all devices."
},
"set_dp": {
"name": "Set datapoint",
"description": "Change the value of a datapoint (DP)",
"fields": {
"device_id": {
"name": "Device ID",
"description": "Device ID of device to change datapoint value for"
},
"dp": {
"name": "DP",
"description": "Datapoint index"
},
"value": {
"name": "Value",
"description": "New value to set"
}
}
}
},
"title": "LocalTuya" "title": "LocalTuya"
} }

View File

@@ -188,5 +188,29 @@
} }
} }
}, },
"services": {
"reload": {
"name": "Reload",
"description": "Reload localtuya and reconnect to all devices."
},
"set_dp": {
"name": "Set datapoint",
"description": "Change the value of a datapoint (DP)",
"fields": {
"device_id": {
"name": "Device ID",
"description": "Device ID of device to change datapoint value for"
},
"dp": {
"name": "DP",
"description": "Datapoint index"
},
"value": {
"name": "Value",
"description": "New value to set"
}
}
}
},
"title": "LocalTuya" "title": "LocalTuya"
} }

View File

@@ -188,5 +188,29 @@
} }
} }
}, },
"services": {
"reload": {
"name": "Reload",
"description": "Reload localtuya and reconnect to all devices."
},
"set_dp": {
"name": "Set datapoint",
"description": "Change the value of a datapoint (DP)",
"fields": {
"device_id": {
"name": "Device ID",
"description": "Device ID of device to change datapoint value for"
},
"dp": {
"name": "DP",
"description": "Datapoint index"
},
"value": {
"name": "Value",
"description": "New value to set"
}
}
}
},
"title": "LocalTuya" "title": "LocalTuya"
} }