diff --git a/homeassistant/components/integration/sensor.py b/homeassistant/components/integration/sensor.py index 22e80e7879e..463cb3b4e05 100644 --- a/homeassistant/components/integration/sensor.py +++ b/homeassistant/components/integration/sensor.py @@ -155,6 +155,7 @@ class IntegrationSensor(RestoreEntity, SensorEntity): if ( old_state is None + or new_state is None or old_state.state in (STATE_UNKNOWN, STATE_UNAVAILABLE) or new_state.state in (STATE_UNKNOWN, STATE_UNAVAILABLE) ):