fix entity not available when offline
This commit is contained in:
parent
ffb1d60575
commit
95bd521d06
@ -152,7 +152,7 @@ class ComputerSwitch(SwitchEntity):
|
|||||||
manufacturer="Generic",
|
manufacturer="Generic",
|
||||||
model="Computer",
|
model="Computer",
|
||||||
sw_version=utils.get_operating_system_version(
|
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)},
|
connections={(dr.CONNECTION_NETWORK_MAC, self._mac_address)},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user