Skip to content

Commit

Permalink
Scale: app and container updates show as bool
Browse files Browse the repository at this point in the history
Scale: unified value names between 24.04 and 24.10
  • Loading branch information
tomaae committed Nov 14, 2024
1 parent 3f0f432 commit f31a803
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 0 additions & 2 deletions custom_components/truenas/binary_sensor_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@
"version",
"human_version",
"update_available",
"container_images_update_available",
"upgrade_available",
"image_updates_available",
"portal",
]
Expand Down
23 changes: 18 additions & 5 deletions custom_components/truenas/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,9 +1143,13 @@ def get_app(self) -> None:
vals=[
{"name": "id", "default": 0},
{"name": "name", "default": "unknown"},
{"name": "human_version", "default": "unknown"},
{"name": "update_available", "default": "unknown"},
{"name": "container_images_update_available", "default": "unknown"},
{"name": "human_version", "type": "bool", "default": False},
{"name": "update_available", "type": "bool", "default": False},
{
"name": "image_updates_available",
"source": "container_images_update_available",
"default": "unknown",
},
{"name": "portal", "source": "portals/open", "default": "unknown"},
{"name": "status", "default": "unknown"},
],
Expand All @@ -1166,8 +1170,17 @@ def get_app(self) -> None:
{"name": "id", "default": 0},
{"name": "name", "default": "unknown"},
{"name": "human_version", "default": "unknown"},
{"name": "upgrade_available", "default": "unknown"},
{"name": "image_updates_available", "default": "unknown"},
{
"name": "update_available",
"source": "upgrade_available",
"type": "bool",
"default": False,
},
{
"name": "image_updates_available",
"type": "bool",
"default": False,
},
{
"name": "portal",
"source": "portals/Web UI",
Expand Down

0 comments on commit f31a803

Please sign in to comment.