File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change 21
21
install_requires = [
22
22
"attrs" ,
23
23
"pyserial-asyncio" ,
24
- "zigpy>=0.20.3 " ,
24
+ "zigpy>=0.21.0 " ,
25
25
"async_timeout" ,
26
26
"voluptuous" ,
27
27
"coloredlogs" ,
Original file line number Diff line number Diff line change @@ -154,15 +154,7 @@ def _receive_zdo_message(
154
154
field_names , field_types = ZDO_CLUSTERS [cluster ]
155
155
assert set (zdo_kwargs ) == set (field_names )
156
156
157
- zdo_args = []
158
-
159
- for f_name , f_type in zip (field_names , field_types ):
160
- # XXX: bugfix for zigpy optional struct bug
161
- if f_type .__name__ == "Optional" :
162
- f_type = f_type .__mro__ [1 ]
163
-
164
- zdo_args .append (f_type (zdo_kwargs [f_name ]))
165
-
157
+ zdo_args = [t (zdo_kwargs [n ]) for n , t in zip (field_names , field_types )]
166
158
message = t .serialize_list ([t .uint8_t (tsn )] + zdo_args )
167
159
168
160
LOGGER .trace ("Pretending we received a ZDO message: %s" , message )
You can’t perform that action at this time.
0 commit comments