Skip to content

Commit e039849

Browse files
committed
Initialise data if None
1 parent 6087d40 commit e039849

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.pre-commit-config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ repos:
166166
- --show-error-context
167167
additional_dependencies:
168168
- zigpy==0.61.0
169-
- aiofiles>=0.4.0
169+
- types_aiofiles>=0.4.0
170+
- types_pytz>=2023.1
170171
# - cryptography==3.3.2 # Compatible/Available on cygwin
171172
#- homeassistant-stubs>=2023.1.7
172173
#- pydantic

custom_components/zha_toolkit/config_flow.py

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class ZhaToolkitCustomConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
4646
data: Optional[dict[str, Any]]
4747

4848
async def my_async_create_entry(self):
49+
if self.data is None:
50+
self.data = {}
4951
self.data["VERSION"] = await u.getVersion()
5052
# Create the configuration entry
5153
return self.async_create_entry(title="ZHA Toolkit", data=self.data)

0 commit comments

Comments
 (0)