Ignore None state in state_change_event (#59485)

This commit is contained in:
Diogo Gomes 2021-11-11 06:31:56 +00:00 committed by GitHub
parent cab9f821a1
commit ec9b5df7b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
):