mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-10-11 20:06:18 +00:00
Cleanup: parameters: extra=forbid, optimize: battery, inverter optional (#361)
* Cleanup: parameters: extra=forbid, optimize: battery, inverter optional * Don't allow extra fields for parameters/REST-API (at least for now while changing API). * Allow both battery and inverter to be set optionally (atm optional battery not implemented, no API constraints). * inverter: Remove default max_power_wh * single_test_optimization: Add more cli-parameters * Workflow docker-build: Don't try to authenticate for PRs * Secrets are not available anyway for forks.
This commit is contained in:
committed by
GitHub
parent
745086c2eb
commit
9ad61f66b2
@@ -1,15 +1,16 @@
|
||||
from typing import Optional
|
||||
|
||||
import numpy as np
|
||||
from pydantic import BaseModel, Field
|
||||
from pydantic import Field
|
||||
|
||||
from akkudoktoreos.core.logging import get_logger
|
||||
from akkudoktoreos.core.pydantic import ParametersBaseModel
|
||||
from akkudoktoreos.devices.devicesabc import DeviceBase
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
|
||||
class HomeApplianceParameters(BaseModel):
|
||||
class HomeApplianceParameters(ParametersBaseModel):
|
||||
consumption_wh: int = Field(
|
||||
gt=0,
|
||||
description="An integer representing the energy consumption of a household device in watt-hours.",
|
||||
|
Reference in New Issue
Block a user