Skip to content

Commit

Permalink
PR HASwitchPlate#140 seems to be a partial fix, so revisit to fix it …
Browse files Browse the repository at this point in the history
…again.
  • Loading branch information
xNUTx committed Sep 5, 2024
1 parent 906749d commit 5de3dac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/openhasp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ async def async_change_page(self, page):
if self._statusupdate:
num_pages = self._statusupdate[HASP_NUM_PAGES]

if isinstance(page, int) and (page <= 0 or page > num_pages):
if isinstance(page, int) and isinstance(num_pages, int) and (page <= 0 or page > num_pages):
_LOGGER.error(
"Can't change to %s, available pages are 1 to %s", page, num_pages
)
Expand Down

0 comments on commit 5de3dac

Please sign in to comment.