Skip to content

Commit

Permalink
Fix chimes beeing set unavailable by other channels
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed Nov 20, 2024
1 parent e03028e commit 674d186
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion reolink_aio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3773,7 +3773,7 @@ def map_channel_json_response(self, json_data, channel: int, chime_id: int = -1)
chime.connect_state = dev["netState"]

for dev_id, chime in self._chime_list.items():
if dev_id not in id_list:
if chime.channel == channel and dev_id not in id_list:
chime.connect_state = -1

elif data["cmd"] == "GetDingDongCfg":
Expand Down
2 changes: 1 addition & 1 deletion reolink_aio/baichuan/baichuan.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ async def get_DingDongList(self, channel: int, **_kwargs) -> None:

chime_list = []
for chime in root.findall(".//dingdongDeviceInfo"):
data = self._get_keys_from_xml(chime, {"id": ("deviceId", int), "name": ("deviceName", str), "netstate": ("netState", int)})
data = self._get_keys_from_xml(chime, {"id": ("deviceId", int), "name": ("deviceName", str), "netstate": ("netState", int), "netState": ("netState", int)})
chime_list.append(data)
json_data = [{"cmd": "GetDingDongList", "code": 0, "value": {"DingDongList": {"pairedlist": chime_list}}}]
self.http_api.map_channel_json_response(json_data, channel)
Expand Down

0 comments on commit 674d186

Please sign in to comment.