From 7a2f84dc251ac716fe6e97937a7967c303d3ad47 Mon Sep 17 00:00:00 2001 From: hoellen Date: Thu, 14 Jan 2021 18:17:43 +0100 Subject: [PATCH] Move unavailable devices to end of list --- __init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/__init__.py b/__init__.py index 02362ed..9551c3a 100644 --- a/__init__.py +++ b/__init__.py @@ -192,6 +192,11 @@ def showEntities(query): entity["state"].capitalize() ) + if state == "unavailable" and "unavailable" not in entity: + entity["unavailable"] = True + entities.append(entity) + continue + # Build item for list item = Item(id=__title__, icon=entity_icon,