Hi
Having done a lot of python rules scripting a year ago, I think it’s time to to it a little more serious on openHAB4.
I’d like to implement my rules on a desktop linux machine before integrating them inito a productive openHAB-server. Thus I want to unit-test my rules first. I already did some trials about this a year ago, and it worked so far.
But now, i updated the HABapp package (to 23.09.2) and started from scratch, using the example from the docs:
#!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
import HABApp
from HABApp.openhab.items import SwitchItem
item = SwitchItem('my_switch', 'ON')
HABApp.core.Items.add_item(item)
This bit of code taken from the docs throws following event:
Ausnahme: ProxyObjHasNotBeenReplacedError
<ConstProxyObj ItemRegistry> has not been replaced on startup!
File "/home/<....>/test2.py", line 9, in <module>
HABApp.core.Items.add_item(item)
HABApp.core.errors.ProxyObjHasNotBeenReplacedError: <ConstProxyObj ItemRegistry> has not been replaced on startup!
So, I have no clue, what to do to fix this