mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-23 17:28:51 +02:00
refactoring
This commit is contained in:
parent
968d5c3859
commit
f8b8dd075b
2 changed files with 4 additions and 10 deletions
|
@ -73,10 +73,7 @@ def from_entry_bool(entry, param, default=False, reverse=False) -> bool:
|
|||
if not isinstance(ret, bool):
|
||||
ret = default
|
||||
|
||||
if reverse:
|
||||
return not ret
|
||||
|
||||
return ret
|
||||
return not ret if reverse else ret
|
||||
|
||||
|
||||
# ---------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue