akkudoktoreos.devices.devicesabc.DevicesStartEndMixin
- class akkudoktoreos.devices.devicesabc.DevicesStartEndMixin
Bases:
ConfigMixin,EnergyManagementSystemMixinA mixin to manage start, end datetimes for devices data.
The starting datetime for devices data generation is provided by the energy management system. Device data cannot be computed if this value is None.
- __init__()
Methods
__init__()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.
Compute the hours from start_datetime to end_datetime.
- 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 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]
- 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