Let , using real-valued smooth and a fixed bounded region. Differentiation under the integral sign and Green's first identity yield
The boundary term vanishes because on , and the heat equation gives in . Consequently
The integrand is continuous and nonnegative. Thus at any fixed time, equality is equivalent to everywhere in , also giving there at that time. This proves Dirichlet energy dissipation for the heat equation.
The boundary condition fixes the boundary temperature in time; it is not a zero normal derivative condition. No sign condition on is used. The stated smoothness licenses the time derivative, spatial integration by parts and boundary trace; without that regularity an appropriate weak energy argument would be required.