Skip to content

Commit e035c70

Browse files
committed
Cleaning up sensor entity update
1 parent 75a53a5 commit e035c70

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

custom_components/petlibro/config_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ async def async_step_account_settings(
229229
for unit_type in self.hub.unit_sensor_unique_ids:
230230
unit = (input if isinstance(input := update_setting.get(unit_type), Unit)
231231
else Unit(input) if input else getattr(self.member, unit_type, None))
232-
if (not unit or not unit.device_class) and not update_all_units:
232+
if (unit_type not in update_setting or not unit or not unit.device_class) and not update_all_units:
233233
continue
234234
_LOGGER.debug("Updating %s sensor entities", unit_type)
235235
if update_all_units and unit_type == API.FEED_UNIT:

0 commit comments

Comments
 (0)