From 95bd521d0683e335804eca706282626d6df00d2b Mon Sep 17 00:00:00 2001 From: Mathieu Broillet Date: Mon, 1 Jan 2024 16:24:00 +0100 Subject: [PATCH] fix entity not available when offline --- custom_components/easy_computer_manager/switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/easy_computer_manager/switch.py b/custom_components/easy_computer_manager/switch.py index 36c6199..10ceb61 100644 --- a/custom_components/easy_computer_manager/switch.py +++ b/custom_components/easy_computer_manager/switch.py @@ -152,7 +152,7 @@ class ComputerSwitch(SwitchEntity): manufacturer="Generic", model="Computer", sw_version=utils.get_operating_system_version( - self._connection) if self._connection.is_connected() else "Unknown", + self._connection) if self._state else "Unknown", connections={(dr.CONNECTION_NETWORK_MAC, self._mac_address)}, )