File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
homeassistant/components/comelit Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ def new_device_listener(
138138 data_type : str ,
139139) -> Callable [[], None ]:
140140 """Subscribe to coordinator updates to check for new devices."""
141- known_devices : set [ int ] = set ()
141+ known_devices : dict [ str , list [ int ]] = {}
142142
143143 def _check_devices () -> None :
144144 """Check for new devices and call callback with any new monitors."""
@@ -147,8 +147,8 @@ def _check_devices() -> None:
147147
148148 new_devices : list [DeviceType ] = []
149149 for _id in coordinator .data [data_type ]:
150- if _id not in known_devices :
151- known_devices .add ( _id )
150+ if _id not in ( id_list := known_devices . get ( data_type , [])) :
151+ known_devices .update ({ data_type : [ * id_list , _id ]} )
152152 new_devices .append (coordinator .data [data_type ][_id ])
153153
154154 if new_devices :
You can’t perform that action at this time.
0 commit comments