akkudoktoreos.devices.devicesabc.DevicesBase
- class akkudoktoreos.devices.devicesabc.DevicesBase
Bases:
DevicesStartEndMixin,PredictionMixinBase class for handling device data.
Enables access to EOS configuration data (attribute config) and EOS prediction data (attribute prediction).
- __init__() None
Methods
__init__()add_device(device)get_device_by_id(device_id)remove_device(device)reset()Attributes
Convenience method/ attribute to retrieve the EOS configuration data.
Convenience method/ attribute to retrieve the EOS energy management system.
Compute the end datetime based on the start_datetime and hours.
Convenience method/ attribute to retrieve the EOS prediction data.
Compute the hours from start_datetime to end_datetime.
- __init__() None
- get_device_by_id(device_id: str) DeviceBase | None
- add_device(device: DeviceBase | None) None
- remove_device(device: Type[DeviceBase] | str) bool
- property config: Any
Convenience method/ attribute to retrieve the EOS configuration data.
- Returns:
The configuration.
- Return type:
- property ems: Any
Convenience method/ attribute to retrieve the EOS energy management system.
- Returns:
The energy management system.
- Return type:
EnergyManagementSystem
- property end_datetime: DateTime | None
Compute the end datetime based on the start_datetime and hours.
Ajusts the calculated end time if DST transitions occur within the prediction window.
- Returns:
The calculated end datetime, or None if inputs are missing.
- Return type:
Optional[DateTime]
- property prediction: Any
Convenience method/ attribute to retrieve the EOS prediction data.
- Returns:
The prediction.
- Return type:
- reset() None
- property total_hours: int | None
Compute the hours from start_datetime to end_datetime.
- Returns:
The duration hours, or None if either datetime is unavailable.
- Return type:
Optional[pendulum.period]