Skip to content

Commit e209f2a

Browse files
committed
Include fields without metadata in _get_features()
Fields like movement_direction (which has init=False but no metadata) were being excluded from available_properties, causing validation errors in the HA integration options flow.
1 parent e5bba07 commit e209f2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pyftms/serializer/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def _get_cls_features(cls):
183183
for field in dc.fields(cls):
184184
meta, tp = cast(ModelMeta, field.metadata), field.type
185185

186-
if not meta or field.name == "code":
186+
if field.name == "code":
187187
continue
188188

189189
if get_origin(tp) in (Optional, Union, UnionType):

0 commit comments

Comments
 (0)