mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-10-11 11:56:17 +00:00
Documentation: Support nested config
* Add examples to pydantic models.
This commit is contained in:
@@ -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],
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user