pybragerone.models.param¶
Runtime-light parameter store.
This module intentionally contains only the minimal structures and logic
needed to store and update raw parameter values (e.g. P5.s0).
All asset-driven behavior (mappings, menu grouping, i18n, computed STATUS rule
evaluation, and rich “describe” helpers) is implemented in
pybragerone.models.param_resolver.ParamResolver.
Classes
|
One parameter "family" (e.g., P4 index 1) collecting channels: v/s/u/n/x... |
|
Store of live parameter values. |
- class pybragerone.models.param.ParamFamilyModel(**data: Any)[source]¶
Bases:
BaseModelOne parameter “family” (e.g., P4 index 1) collecting channels: v/s/u/n/x…
- model_config: ClassVar[ConfigDict] = {'frozen': False, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pybragerone.models.param.ParamStore(**data: Any)[source]¶
Bases:
BaseModelStore of live parameter values.
Notes
Keys use the BragerOne addressing format:
P<n>.<chan><idx>(e.g.P5.s0,P4.v1,P4.u1).This class is designed to be safe and fast for HA runtime.
- Parameters:
families (dict[str, ParamFamilyModel])
- families: dict[str, ParamFamilyModel]¶
- get_family(pool: str, idx: int)[source]¶
Get ParamFamilyModel by (pool, idx) address, or None if not found.
- Return type:
- Parameters:
- ingest_prime_payload(payload: Mapping[str, Any])[source]¶
Ingest REST prime payload (modules/parameters) into the store.
- model_config: ClassVar[ConfigDict] = {'frozen': False, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- async run_with_bus(bus: EventBus)[source]¶
Consume ParamUpdate events from EventBus and upsert into ParamStore.