Weird Entities card alignment after upgrading to 2021.6.5

After upgrading from 2021.5.something to 2021.6.5, each entity in entities card started occupying three lines as shown. I am not using any custom cards, plain Entities only. This behavior happens consistently in Safari for Mac (Big Sur) and iOS apps. On Chrome it sometimes shows the same wrong layout but a refresh fixes it. Another refresh can exhibit the same alignment error though!
Any ideas? I searched open bugs but did not seem to find related issues.

Please ignore, found a solution. After upgrading two HACs modules to latest, the problem went away. Most likely the issue was with an outdated tempelate-entity-row. It was installed but not used, but that seems to be enough for it to inject its stuff in HA html pages.