diff --git a/src/components/chart/ha-network-graph.ts b/src/components/chart/ha-network-graph.ts index 9edd2eccaa..2293b9fc02 100644 --- a/src/components/chart/ha-network-graph.ts +++ b/src/components/chart/ha-network-graph.ts @@ -106,14 +106,18 @@ export class HaNetworkGraph extends SubscribeMixin(LitElement) { if (!GraphChart) { return nothing; } + const isMobile = window.matchMedia( + "all and (max-width: 450px), all and (max-height: 500px)" + ).matches; return html` { const containerWidth = this.clientWidth; const containerHeight = this.clientHeight; @@ -184,7 +189,7 @@ export class HaNetworkGraph extends SubscribeMixin(LitElement) { position: "right", }, emphasis: { - focus: "adjacency", + focus: isMobile ? "none" : "adjacency", }, force: { repulsion: [400, 600],