Hello,
I’m somehow stuck in my current idea, and perhaps someone can help. I tried to browse the forum, I actually found something, but unfortunately nothing that really helps.
What I want is basically pretty easy.
I want to extend the hass.Hass Class with some additional functions.
I create a python file like this: (located in my apps directory in a subfolder called test
import hassapi as hass
class Test(hass.Hass):
def initialize(self):
self.turn_on_off_entities = ["switch", "light", "input_boolean"]
def testfunction(self):
self.log("test")
in my appdaemon app I now want to do something like:
from test.test import Test
class apptest(Test):
def initialize(self):
self.testfunction()
my app is added to my apps.yaml, and initialized, my class Test now (also if i add it it’s not working)
It tells me that the testfunction is not available.
When I try to initialize the super().initialize() it tells me that super has no initilize.
has anyone any idea what my problem could be?
or perhaps anyone can share a working example?
thanks
martin