Skip to content

Commit

Permalink
Hotfix for 3.3 devices detect_available_dps
Browse files Browse the repository at this point in the history
  • Loading branch information
xZetsubou committed Oct 16, 2023
1 parent d8e25e6 commit 6170b69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/localtuya/core/pytuya/__init__.py
Original file line number Diff line number Diff line change
@@ -1080,9 +1080,9 @@ async def detect_available_dps(self, cid=None):
self.dps_cache.update({"parent": data["dps"]})

if self.dev_type == "type_0a":
return self.dps_cache
return self.dps_cache.get(cid) if cid else self.dps_cache.get("parent")
self.dps_to_request = self.dps_cache
return self.dps_cache.get(cid) or self.dps_cache.get("parent")
return self.dps_cache.get(cid) if cid else self.dps_cache.get("parent")

def add_dps_to_request(self, dp_indicies):
"""Add a datapoint (DP) to be included in requests."""

0 comments on commit 6170b69

Please sign in to comment.