diff --git a/homeassistant/components/onvif/camera.py b/homeassistant/components/onvif/camera.py
index 528b9605bbc..758631e6e29 100644
--- a/homeassistant/components/onvif/camera.py
+++ b/homeassistant/components/onvif/camera.py
@@ -109,7 +109,7 @@ class ONVIFCameraEntity(ONVIFBaseEntity, Camera):
device.config_entry.data.get(CONF_SNAPSHOT_AUTH)
== HTTP_BASIC_AUTHENTICATION
)
- self._stream_uri = None
+ self._stream_uri: str | None = None
@property
def name(self) -> str:
@@ -185,7 +185,7 @@ class ONVIFCameraEntity(ONVIFBaseEntity, Camera):
finally:
await stream.close()
- async def async_added_to_hass(self):
+ async def async_added_to_hass(self) -> None:
"""Run when entity about to be added to hass."""
uri_no_auth = await self.device.async_get_stream_uri(self.profile)
url = URL(uri_no_auth)
diff --git a/homeassistant/components/onvif/device.py b/homeassistant/components/onvif/device.py
index dda28e07a2a..d7f50f6744e 100644
--- a/homeassistant/components/onvif/device.py
+++ b/homeassistant/components/onvif/device.py
@@ -74,12 +74,12 @@ class ONVIFDevice:
return self.config_entry.data[CONF_PORT]
@property
- def username(self) -> int:
+ def username(self) -> str:
"""Return the username of this device."""
return self.config_entry.data[CONF_USERNAME]
@property
- def password(self) -> int:
+ def password(self) -> str:
"""Return the password of this device."""
return self.config_entry.data[CONF_PASSWORD]