From 21100a50960bcc728de271b06a51e322d2919e0a Mon Sep 17 00:00:00 2001 From: Edward Brown Date: Mon, 24 Nov 2025 10:10:41 +0000 Subject: [PATCH] Fix relative import statements --- haco/button.py | 2 +- haco/climate.py | 4 ++-- haco/control.py | 8 ++++++++ haco/pulldown.py | 2 +- haco/switch.py | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) 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)