cremalink.parsing.monitor.view module
This module provides the MonitorView class, which offers a high-level, user-friendly interface for accessing data from a MonitorSnapshot.
- class cremalink.parsing.monitor.view.MonitorView(snapshot: MonitorSnapshot, profile: MonitorProfile | dict[str, Any] | None = None)[source]
Bases:
objectA user-friendly view of a MonitorSnapshot, powered by a MonitorProfile.
This class acts as a wrapper around a MonitorSnapshot. It uses a given MonitorProfile to translate raw, low-level data (like integer codes and bit flags) into human-readable values (like enum names and boolean predicates).
It provides dynamic attribute access (__getattr__) to resolve flags and predicates from the profile on the fly. For example, view.is_on or view.has_descaling_alarm.
- property accessory_name: str | None
The human-readable name of the accessory (e.g., ‘Milk Carafe’).
- property available_fields: list[str]
A list of all available dynamic fields (flags and predicates).
- property received_at
The timestamp when the snapshot was received.