WhatsApp Addon: import could not be resolved

Hi,

I am trying to use the integration of WhatsApp. The Whatsapp services of this integration is available and its services can be used (*).

However I notice some errors in Visual Studio Code and I was wondering if I could ignore these because the warnings are incorrect? I know of similar problems.

file: init.py :

  • Import “homeassistant.core” could not be resolved
  • Import “homeassistant.helpers.typing” could not be resolved
    showing one:
[{
	"resource": "/opt/ha_test/config/custom_components/whatsapp/__init__.py",
	"owner": "_generated_diagnostic_collection_name_#4",
	"code": {
		"value": "reportMissingImports",
		"target": {
			"$mid": 1,
			"path": "/microsoft/pyright/blob/main/docs/configuration.md",
			"scheme": "https",
			"authority": "github.com",
			"fragment": "reportMissingImports"
		}
	},
	"severity": 4,
	"message": "Import \"homeassistant.helpers.typing\" could not be resolved",
	"source": "Pylance",
	"startLineNumber": 8,
	"startColumn": 6,
	"endLineNumber": 8,
	"endColumn": 34
}]

file: whatsapp.py - Import “url_normalize” could not be resolved

[{
	"resource": "/opt/ha_test/config/custom_components/whatsapp/whatsapp.py",
	"owner": "_generated_diagnostic_collection_name_#4",
	"code": {
		"value": "reportMissingImports",
		"target": {
			"$mid": 1,
			"path": "/microsoft/pyright/blob/main/docs/configuration.md",
			"scheme": "https",
			"authority": "github.com",
			"fragment": "reportMissingImports"
		}
	},
	"severity": 4,
	"message": "Import \"url_normalize\" could not be resolved",
	"source": "Pylance",
	"startLineNumber": 2,
	"startColumn": 6,
	"endLineNumber": 2,
	"endColumn": 19
}]

I can not use the addon itself because my Homeassistant is installed in Docker.
(*) If someone knows the correct syntax to fill in each Whatsapp services that will be most welcome too.

(I realize that I still need to find out how to interact with the Dockered “whatsapp-api”)