Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemanspiff2007 committed Jan 9, 2024
1 parent 1d39f5a commit fe5d4c5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
16 changes: 8 additions & 8 deletions docs/class_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,63 +33,63 @@ Scheduler
OneTimeJob
""""""""""""""""""""""""""""""""""""""

.. autoclass:: eascheduler.scheduler_view.OneTimeJob
.. autoclass:: HABApp.rule.scheduler.jobs.OneTimeJob
:members:
:inherited-members:
:member-order: groupwise

CountdownJob
""""""""""""""""""""""""""""""""""""""

.. autoclass:: eascheduler.scheduler_view.CountdownJob
.. autoclass:: HABApp.rule.scheduler.jobs.CountdownJob
:members:
:inherited-members:
:member-order: groupwise

ReoccurringJob
""""""""""""""""""""""""""""""""""""""

.. autoclass:: eascheduler.scheduler_view.ReoccurringJob
.. autoclass:: HABApp.rule.scheduler.jobs.ReoccurringJob
:members:
:inherited-members:
:member-order: groupwise

DayOfWeekJob
""""""""""""""""""""""""""""""""""""""

.. autoclass:: eascheduler.scheduler_view.DayOfWeekJob
.. autoclass:: HABApp.rule.scheduler.jobs.DayOfWeekJob
:members:
:inherited-members:
:member-order: groupwise

DawnJob
""""""""""""""""""""""""""""""""""""""

.. autoclass:: eascheduler.scheduler_view.DawnJob
.. autoclass:: HABApp.rule.scheduler.jobs.DawnJob
:members:
:inherited-members:
:member-order: groupwise

SunriseJob
""""""""""""""""""""""""""""""""""""""

.. autoclass:: eascheduler.scheduler_view.SunriseJob
.. autoclass:: HABApp.rule.scheduler.jobs.SunriseJob
:members:
:inherited-members:
:member-order: groupwise

SunsetJob
""""""""""""""""""""""""""""""""""""""

.. autoclass:: eascheduler.scheduler_view.SunsetJob
.. autoclass:: HABApp.rule.scheduler.jobs.SunsetJob
:members:
:inherited-members:
:member-order: groupwise

DuskJob
""""""""""""""""""""""""""""""""""""""

.. autoclass:: eascheduler.scheduler_view.DuskJob
.. autoclass:: HABApp.rule.scheduler.jobs.DuskJob
:members:
:inherited-members:
:member-order: groupwise
22 changes: 14 additions & 8 deletions src/HABApp/rule/scheduler/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@
import inspect

import eascheduler.scheduler_view
from eascheduler.const import FAR_FUTURE
from eascheduler.jobs import CountdownJob as CountdownJobBase
from eascheduler.jobs import DawnJob as DawnJobBase
from eascheduler.jobs import DayOfWeekJob as DayOfWeekJobBase
from eascheduler.jobs import DuskJob as DuskJobBase
from eascheduler.jobs import OneTimeJob as OneTimeJobBase
from eascheduler.jobs import ReoccurringJob as ReoccurringJobBase
from eascheduler.jobs import SunriseJob as SunriseJobBase
from eascheduler.jobs import SunsetJob as SunsetJobBase
from eascheduler.jobs.job_base import ScheduledJobBase

from HABApp.core.internals import uses_item_registry
from HABApp.core.items import BaseValueItem
from HABApp.core.wrapper import ignore_exception
from HABApp.openhab.items import OpenhabItem
from eascheduler.const import FAR_FUTURE
from eascheduler.jobs import (
CountdownJob as CountdownJobBase, DawnJob as DawnJobBase, DayOfWeekJob as DayOfWeekJobBase,
DuskJob as DuskJobBase, OneTimeJob as OneTimeJobBase, ReoccurringJob as ReoccurringJobBase,
SunriseJob as SunriseJobBase, SunsetJob as SunsetJobBase
)
from eascheduler.jobs.job_base import ScheduledJobBase


Items = uses_item_registry()

Expand Down Expand Up @@ -45,8 +50,9 @@ def _timestamp_to_item(self, job: ScheduledJobBase):

def to_item(self, item: str | BaseValueItem | None):
"""Sends the next execution (date)time to an item. Sends ``None`` if the job is not scheduled.
Every time the scheduler updates to a new (date)time the item will also receive the updated time.
:param item: item name or item, None to disable
:param item: item name or item, ``None`` to disable
"""
if item is None:
self._item = None
Expand Down

0 comments on commit fe5d4c5

Please sign in to comment.