optional kwargs

This commit is contained in:
John Lancaster
2025-11-21 18:33:14 -06:00
parent a85a06b207
commit d6941f8c7c

View File

@@ -8,8 +8,9 @@ from pydantic import field_serializer
class EntityState(BaseModel):
state: bool = True
color_temp_kelvin: int
brightness: int
color_temp_kelvin: int | None = None
rgb_color: list[int] | None = None
brightness: int | None = None
@field_serializer('state')
def convert_state(self, val: Any):