Closed chemelli74 closed 1 year ago
I suggest to rename device_update
to update_available
and return an empty string (resolves to False) or the new version as a string (resolves to True):
@property
def update_available(self):
"""
The new version number (as a string) if an update is available or an
empty string if no update is avilable.
"""
return self.fc.call_action("UserInterface1", "GetInfo")["NewX_AVM-DE_Version"]
This way an application can use the library like
if version := fs.update_available:
print(f"new FritzOS version available: {version}")
else:
print("FritzOS up to date.")
Well, we don't use the Walrus operator in fritzconnection itself, as Python 3.6 and 3.7 are still supported.
Done, should be fine to go now.
Thx,
Simone
Add a property to get info about new firmware update.
cc @mib1185