diff --git a/homeassistant/components/number/significant_change.py b/homeassistant/components/number/significant_change.py index 14cb2246615..e8cdd78e321 100644 --- a/homeassistant/components/number/significant_change.py +++ b/homeassistant/components/number/significant_change.py @@ -44,7 +44,6 @@ def async_check_significant_change( if (device_class := new_attrs.get(ATTR_DEVICE_CLASS)) is None: return None - absolute_change: float | None = None percentage_change: float | None = None # special for temperature @@ -83,11 +82,8 @@ def async_check_significant_change( # Old state was invalid, we should report again return True - if absolute_change is not None and percentage_change is not None: + if percentage_change is not None: return _absolute_and_relative_change( float(old_state), float(new_state), absolute_change, percentage_change ) - if absolute_change is not None: - return check_absolute_change( - float(old_state), float(new_state), absolute_change - ) + return check_absolute_change(float(old_state), float(new_state), absolute_change)