You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the migration to Koltinx serialization we've lost the generic type on the Entity class. It was most of the time used with Any and was loosing the interest of having a generic. The only case where it was used properly was for ZoneAttributes.
We should aim to do this more to enforce some proper checks on the types on well known types. It is important that we keep a certain flexibility still because we don't know all the Entity that exist in the ecosystem of Home Assistant.
Tips: We could do something like in SocketResponse with a sealed class and a default serializer to get all the values if we are not able to detect the type of the Entity properly.
The text was updated successfully, but these errors were encountered:
With the migration to Koltinx serialization we've lost the generic type on the Entity class. It was most of the time used with
Any
and was loosing the interest of having a generic. The only case where it was used properly was forZoneAttributes
.We should aim to do this more to enforce some proper checks on the types on well known types. It is important that we keep a certain flexibility still because we don't know all the Entity that exist in the ecosystem of Home Assistant.
Tips: We could do something like in
SocketResponse
with a sealed class and a default serializer to get all the values if we are not able to detect the type of the Entity properly.The text was updated successfully, but these errors were encountered: