From 87b013bf71e574a58e50fbf9fb65e5d36653422d Mon Sep 17 00:00:00 2001 From: Roman Appenzeller Date: Tue, 23 Apr 2024 21:04:45 +0000 Subject: [PATCH] Fix error handling in has_color --- pyfibaro/fibaro_device.py | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfibaro/fibaro_device.py b/pyfibaro/fibaro_device.py index 34b3c0d..9988d21 100644 --- a/pyfibaro/fibaro_device.py +++ b/pyfibaro/fibaro_device.py @@ -516,7 +516,7 @@ def has_color(self) -> bool: try: self.rgbw_color return True - except TypeError: + except (TypeError, ValueError): return False return False diff --git a/setup.cfg b/setup.cfg index 699c13c..b2e42a3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pyfibaro -version = 0.7.7 +version = 0.7.8 description = Simple API to access fibaro home center from any Python 3 script. Designed for Home Assistant (but not only) long_description = file: README.md long_description_content_type = text/markdown