Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglemansweep committed May 3, 2024
1 parent 925b622 commit 77f3351
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wideboy/sprites/tile_grid/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class FontAwesomeIcons:


def is_defined(value) -> bool:
return value is not None and value not in ["unavailable"]
return value is not None and value not in ["unavailable", "unknown"]


def template_if_defined(value, template):
Expand Down
4 changes: 2 additions & 2 deletions wideboy/systems/scene/entity_tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,11 @@ def label(self):

@property
def open(self):
return is_defined(self.value) and self.value < 50
return is_defined(self.value) and int(self.value) < 50

@property
def icon_codepoint(self):
if self.value is None:
if not is_defined(self.value):
return None
if self.value < 20:
return FontAwesomeIcons.ICON_FA_BATTERY_EMPTY
Expand Down

0 comments on commit 77f3351

Please sign in to comment.