  Let $G$ be the semidirect product $N \rtimes \mathbb{R}$, where $N$ is a
stratified Lie group and $\mathbb{R}$ acts on $N$ via automorphic dilations.
Homogeneous left-invariant sub-Laplacians on $N$ and $\mathbb{R}$ can be lifted
to $G$, and their sum $\Delta$ is a left-invariant sub-Laplacian on $G$. In
previous joint work of Ottazzi, Vallarino and the first-named author, a
spectral multiplier theorem of Mihlin--H\"ormander type was proved for
$\Delta$, showing that an operator of the form $F(\Delta)$ is of weak type
$(1,1)$ and bounded on $L^p(G)$ for all $p \in (1,\infty)$ provided $F$
satisfies a scale-invariant smoothness condition of order $s > (Q+1)/2$, where
$Q$ is the homogeneous dimension of $N$. Here we show that, if $N$ is a group
of Heisenberg type, or more generally a direct product of M\'etivier and
abelian groups, then the smoothness condition can be pushed down to the sharp
threshold $s>(d+1)/2$, where $d$ is the topological dimension of $N$. The proof
is based on lifting to $G$ weighted Plancherel estimates on $N$ and exploits a
relation between the functional calculi for $\Delta$ and analogous operators on
semidirect extensions of Bessel--Kingman hypergroups.
