Documentation: Support nested config

* Add examples to pydantic models.
This commit is contained in:
Dominique Lasserre
2025-01-15 00:54:45 +01:00
parent be26457563
commit d74a56b75a
29 changed files with 8200 additions and 9424 deletions

View File

@@ -10,14 +10,18 @@ logger = get_logger(__name__)
class HomeApplianceParameters(DeviceParameters):
device_id: str = Field(description="ID of home appliance")
"""Home Appliance Device Simulation Configuration."""
device_id: str = Field(description="ID of home appliance", examples=["dishwasher"])
consumption_wh: int = Field(
gt=0,
description="An integer representing the energy consumption of a household device in watt-hours.",
examples=[2000],
)
duration_h: int = Field(
gt=0,
description="An integer representing the usage duration of a household device in hours.",
examples=[3],
)