Fix Tuya number native value raw return (#83333)

fixes undefined
pull/83349/head
Michał Ajduk 2022-12-05 16:55:21 +01:00 committed by GitHub
parent bd04c1d9f9
commit ff7a70d31b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -410,7 +410,7 @@ class TuyaNumberEntity(TuyaEntity, NumberEntity):
return None
# Raw value
if not (value := self.device.status.get(self.entity_description.key)):
if (value := self.device.status.get(self.entity_description.key)) is None:
return None
return self._number.scale_value(value)