File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -158,12 +158,10 @@ def _all_appliances(self) -> bool:
158158
159159 self ._create_gw_entities (appl )
160160
161- LOGGER .debug ("HOI existing: %s" , self ._existing_appliances )
162- LOGGER .debug ("HOI new: %s" , self ._new_appliances )
163161 removed = list (set (self ._existing_appliances ) - set (self ._new_appliances ))
164162 if self ._existing_appliances :
165163 if not removed :
166- LOGGER .debug ("HOI no removed appliance(s)." )
164+ LOGGER .debug ("HOI no new or removed appliance(s)." )
167165 return False
168166 else :
169167 LOGGER .debug ("HOI removed appliance(s): %s" , removed )
@@ -172,7 +170,9 @@ def _all_appliances(self) -> bool:
172170 return False
173171
174172 # A smartmeter is not present as an appliance, add it specifically
175- if self .smile .type == "power" or self .smile .anna_p1 :
173+ if not self ._existing_appliances and (
174+ self .smile .type == "power" or self .smile .anna_p1
175+ ):
176176 self ._add_p1_smartmeter_info ()
177177
178178 # Sort the gw_entities
Original file line number Diff line number Diff line change @@ -111,11 +111,7 @@ def get_all_gateway_entities(self) -> None:
111111 Collect and add switching- and/or pump-group entities.
112112 Finally, collect the data and states for each entity.
113113 """
114- execute = self ._all_appliances ()
115- LOGGER .debug ("HOI self._all_appliances() = %s" , execute )
116- if not execute :
117- LOGGER .debug ("HOI no new appliances found, skipping" )
118- else :
114+ if self ._all_appliances ():
119115 if self ._is_thermostat :
120116 self .therms_with_offset_func = (
121117 self ._get_appliances_with_offset_functionality ()
You can’t perform that action at this time.
0 commit comments