Skip to content

Commit

Permalink
fix setup
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemanspiff2007 committed Sep 19, 2024
1 parent d7da345 commit 895b372
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,16 @@ All items have two additional timestamps set which can be used to simplify rule
.. exec_code::

# ------------ hide: start ------------
from pendulum import DateTime
from whenever import Instant
from HABApp.core.items import Item
from rule_runner import SimpleRuleRunner

runner = SimpleRuleRunner()
runner.set_up()

item = Item.get_create_item('Item_Name', initial_value='old_value')
item._last_update.dt = DateTime(2022, 8, 20, 12, 16)
item._last_change.dt = DateTime(2022, 8, 20, 10, 30)
item._last_change.instant = Instant.from_utc(2024, 4, 30, 10, 30)
item._last_update.instant = Instant.from_utc(2024, 4, 30, 12, 16)

# ------------ hide: stop -------------
import HABApp
Expand Down

0 comments on commit 895b372

Please sign in to comment.