diff --git a/haco/button.py b/haco/button.py index 93d8a70..9364177 100644 --- a/haco/button.py +++ b/haco/button.py @@ -1,7 +1,7 @@ from dataclasses import dataclass -from control import Control from haco.capabilities import Capability +from haco.control import Control @dataclass(kw_only=True) diff --git a/haco/climate.py b/haco/climate.py index 7e4a029..f18d880 100644 --- a/haco/climate.py +++ b/haco/climate.py @@ -1,8 +1,8 @@ from dataclasses import dataclass from typing import Literal -from capabilities import Capability -from control import Control +from haco.capabilities import Capability +from haco.control import Control @dataclass(kw_only=True) diff --git a/haco/control.py b/haco/control.py index 0664d52..c8665ef 100644 --- a/haco/control.py +++ b/haco/control.py @@ -86,6 +86,14 @@ class Control(Base): async def initialise(self): ... + async def announce2(self): + """ + + Entities must be able to announce themselves to Home Assistant, e.g. when a pulldown changes its options, etc. + + """ + await self.device.client.publish(self.announce_topic, self.announce) + if __name__ == "__main__": control = Control(name="test", platform="test") diff --git a/haco/pulldown.py b/haco/pulldown.py index 1bd6c8b..c49b058 100644 --- a/haco/pulldown.py +++ b/haco/pulldown.py @@ -1,6 +1,6 @@ from dataclasses import dataclass -from control import Control +from haco.control import Control @dataclass(kw_only=True) diff --git a/haco/switch.py b/haco/switch.py index b9cc1a4..6c9ab22 100644 --- a/haco/switch.py +++ b/haco/switch.py @@ -1,6 +1,6 @@ from dataclasses import dataclass -from control import Control +from haco.control import Control @dataclass(kw_only=True)