When you are rendering your LiveView through controller, you are using app.html.eex layout view. That is actually a just a regular app view, with injected live view.
When you are mounting LiveView directly in the router, you should specify, which default view it should use.
you can provide, but there you will not have access to @conn object in the template anymore
live “/thermostat”, ThermostatLive, layout: {AppWeb.LayoutView, "app.html"}