diff --git a/homeassistant/components/tuya/base.py b/homeassistant/components/tuya/base.py index 3f918075b7a4b..8e25c5faff5a5 100644 --- a/homeassistant/components/tuya/base.py +++ b/homeassistant/components/tuya/base.py @@ -259,7 +259,7 @@ def get_dptype( try: return DPType(getattr(self.device, key)[dpcode].type) except ValueError: - return TuyaEntity.determine_dptype(self.device, key)[dpcode].type + return TuyaEntity.determine_dptype(getattr(self.device, key)[dpcode].type) return None