Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign AppInfo: Update sensor #96

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Restored version check
  • Loading branch information
richibrics committed Mar 9, 2024
commit 0d889e8570c2187c3dc21395961d4bffae1a0a29
5 changes: 4 additions & 1 deletion IoTuring/Entity/Deployments/AppInfo/AppInfo.py
Original file line number Diff line number Diff line change
@@ -35,7 +35,10 @@ def Update(self):
try:
new_version = self.GetUpdateInformation()

self.SetEntitySensorValue(KEY_LATEST_VERSION, "2025.1.1")
if not new_version: # signal no update and current version (as its the latest)
self.SetEntitySensorValue(KEY_LATEST_VERSION, App.getVersion())
else: # signal update and latest version
self.SetEntitySensorValue(KEY_LATEST_VERSION, new_version)
except Exception as e:
# connection error or pypi name changed or something else
# add extra attribute to show error message
Loading