preheat_open.helpers.now

preheat_open.helpers.now(step=None, tz=tzfile('/usr/share/zoneinfo/Europe/Copenhagen'))

Method to determine now time (and round it to the current step start if required)

Parameters:
  • step (Union[Enum, str, None]) – if provided, floors the current time to the start of the step (if None, no manipulation of the current time is made)

  • tz (Optional[tzinfo]) – timezone (default: local danish timezone)

Return type:

datetime

Returns:

datetime