is_active

is_active(value: str) bool[source]

Check if a schedule string dictates activity at the current time.

The value can be “ON”, “OFF”, or a range of days (e.g., “Mon-Fri”). Uses DAYTIME and NIGHTTIME settings to determine active hours within those days.

Parameters:

value (str) – The schedule string to evaluate.

Returns:

True if active right now, False otherwise.

Return type:

bool