Fix no disconnect after 5 minute timeout (#8339)

This commit is contained in:
chriss158 2021-02-07 14:33:44 +01:00 committed by GitHub
parent c04419fd09
commit c3f50ba0fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,7 +183,7 @@ export class HomeAssistantAppEl extends QuickBarMixin(HassElement) {
this._hiddenTimeout = undefined;
// setTimeout can be delayed in the background and only fire
// when we switch to the tab or app again (Hey Android!)
if (!document.hidden) {
if (document.hidden) {
this._suspendApp();
}
}, 300000);