Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeweerd committed Apr 24, 2023
1 parent 21abde0 commit dfff5c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/zha_toolkit/scan_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ async def discover_commands_generated(
await asyncio.sleep(0.2)
except (ValueError, DeliveryError, asyncio.TimeoutError) as ex:
LOGGER.error(
"Failed to discover generated 0x%04X commands starting %s. Error: %s",
"Failed to discover generated 0x%04X commands"
" starting %s. Error: %s",
cluster.cluster_id,
cmd_id,
ex,
Expand Down
2 changes: 2 additions & 0 deletions custom_components/zha_toolkit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
LOGGER = logging.getLogger(__name__)

if packaging.version.parse(HA_VERSION) < packaging.version.parse("2023.4"):
# pylint: disable=ungrouped-imports
from homeassistant.util.json import save_json
else:
# pylint: disable=ungrouped-imports
from homeassistant.helpers.json import save_json

if typing.TYPE_CHECKING:
Expand Down

0 comments on commit dfff5c2

Please sign in to comment.