preheat_open.time.TimeResolution

class preheat_open.time.TimeResolution(value)

Bases: Enum

Enum representing different time resolutions.

Attributes:

RAW: Raw time resolution. MIN5: 5-minute time resolution. HOUR: Hourly time resolution. DAY: Daily time resolution. WEEK: Weekly time resolution. MONTH: Monthly time resolution. YEAR: Yearly time resolution.

Examples:
>>> tr = TimeResolution.HOUR
>>> print(tr)
TimeResolution.HOUR
>>> print(tr.pandas_alias)
H
__init__(*args)

Methods

__init__(*args)

Attributes

RAW

MIN5

HOUR

DAY

WEEK

MONTH

YEAR

pandas_alias

Returns the pandas alias for the time resolution.

total_seconds

Returns the total number of seconds for the time resolution.

timedelta

Returns the timedelta for the time resolution.

property pandas_alias: str

Returns the pandas alias for the time resolution.

Returns:

The pandas alias.

Return type:

str

property timedelta

Returns the timedelta for the time resolution.

Returns:

The timedelta.

Return type:

timedelta

property total_seconds: int

Returns the total number of seconds for the time resolution.

Returns:

The total number of seconds.

Return type:

int