From 2520518c2e4b4e9cfe82d7367acdf42ffa547239 Mon Sep 17 00:00:00 2001 From: Edward Brown Date: Wed, 28 Oct 2026 17:41:06 +0000 Subject: [PATCH] Release documentation version 0.4.5 --- 404.html | 30 ++ changelog/0.3.0/index.html | 30 ++ changelog/0.3.4/index.html | 30 ++ changelog/0.4.3/index.html | 30 ++ changelog/0.4.4/index.html | 32 ++ changelog/0.4.5/index.html | 612 +++++++++++++++++++++++++++++++++++++ controls/index.html | 30 ++ index.html | 30 ++ quick-start/index.html | 30 ++ search/search_index.json | 2 +- 10 files changed, 855 insertions(+), 1 deletion(-) create mode 100644 changelog/0.4.5/index.html diff --git a/404.html b/404.html index fb286e1..d3d3cbf 100644 --- a/404.html +++ b/404.html @@ -308,6 +308,8 @@ + + @@ -462,6 +464,34 @@ + + + + + + +
  • + + + + + + + + 0.4.5 + + + + + + + + +
  • + + + + diff --git a/changelog/0.3.0/index.html b/changelog/0.3.0/index.html index 9494c23..2c82ff1 100644 --- a/changelog/0.3.0/index.html +++ b/changelog/0.3.0/index.html @@ -313,6 +313,8 @@ + + @@ -476,6 +478,34 @@ + + + + + + +
  • + + + + + + + + 0.4.5 + + + + + + + + +
  • + + + + diff --git a/changelog/0.3.4/index.html b/changelog/0.3.4/index.html index 514132e..da49c69 100644 --- a/changelog/0.3.4/index.html +++ b/changelog/0.3.4/index.html @@ -313,6 +313,8 @@ + + @@ -476,6 +478,34 @@ + + + + + + +
  • + + + + + + + + 0.4.5 + + + + + + + + +
  • + + + + diff --git a/changelog/0.4.3/index.html b/changelog/0.4.3/index.html index a2fa06b..695944e 100644 --- a/changelog/0.4.3/index.html +++ b/changelog/0.4.3/index.html @@ -313,6 +313,8 @@ + + @@ -476,6 +478,34 @@ + + + + + + +
  • + + + + + + + + 0.4.5 + + + + + + + + +
  • + + + + diff --git a/changelog/0.4.4/index.html b/changelog/0.4.4/index.html index e5eaf29..7f0c3cd 100644 --- a/changelog/0.4.4/index.html +++ b/changelog/0.4.4/index.html @@ -14,6 +14,8 @@ + + @@ -311,6 +313,8 @@ + + @@ -474,6 +478,34 @@ + + + + + + +
  • + + + + + + + + 0.4.5 + + + + + + + + +
  • + + + + diff --git a/changelog/0.4.5/index.html b/changelog/0.4.5/index.html new file mode 100644 index 0000000..0eeb7ab --- /dev/null +++ b/changelog/0.4.5/index.html @@ -0,0 +1,612 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4.5 - haco + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    + +
    + + + + + + + + +
    + + +
    + +
    + + + + + + +
    +
    + + + +
    +
    +
    + + + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    + +
    + + + + + + + + +

    0.4.5

    + +
      +
    • Restored the runtime dependency metadata for installations.
    • +
    • Added the automated Haco test environment to release validation.
    • +
    + + + + + + + + + + + + + +
    +
    + + + +
    + +
    + + + +
    +
    +
    +
    + + + + + + + + + + + + + \ No newline at end of file diff --git a/controls/index.html b/controls/index.html index f6fad83..bb4a11f 100644 --- a/controls/index.html +++ b/controls/index.html @@ -419,6 +419,8 @@ + + @@ -573,6 +575,34 @@ + + + + + + +
  • + + + + + + + + 0.4.5 + + + + + + + + +
  • + + + + diff --git a/index.html b/index.html index 2199641..f7c3657 100644 --- a/index.html +++ b/index.html @@ -406,6 +406,8 @@ + + @@ -560,6 +562,34 @@ + + + + + + +
  • + + + + + + + + 0.4.5 + + + + + + + + +
  • + + + + diff --git a/quick-start/index.html b/quick-start/index.html index 266d81d..734b711 100644 --- a/quick-start/index.html +++ b/quick-start/index.html @@ -327,6 +327,8 @@ + + @@ -481,6 +483,34 @@ + + + + + + +
  • + + + + + + + + 0.4.5 + + + + + + + + +
  • + + + + diff --git a/search/search_index.json b/search/search_index.json index 9e1f8cb..792ed9c 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"Home","text":"

    How Do I Get Started?

    See the Quick Start section.

    "},{"location":"#haco-home-assistant-control-objects","title":"haco Home Assistant Control Objects","text":"

    haco greatly simplifies the process of exposing Home Assistant controls (e.g. Pull-down Lists, Number Sliders, Sensors, etc.) from a device - and handling the communication between both sides.

    While the current implementation is in Python, the capability definitions for controls are designed to be shared across different languages. Support for additional languages (namely native support for Tasmota Berry) is planned.

    "},{"location":"#why-mqtt","title":"Why MQTT?","text":"

    You might wonder why we use MQTT instead of directly using Home Assistant's APIs. The reason is flexibility: using MQTT allows haco to target any device or environment that has an MQTT client, not just those that can easily make HTTP requests or run a full HA integration. This makes it ideal for lightweight embedded systems and cross-platform utility.

    "},{"location":"#why-would-i-want-such-a-thing","title":"Why Would I Want Such a Thing?","text":"

    Integrating custom hardware or scripts with Home Assistant often involves a lot of boilerplate: defining MQTT topics, crafting JSON payloads for discovery, and managing state updates. haco handles the heavy lifting, letting you define your device and its controls in clean, declarative Python.

    If you're building a custom IoT device, a script to monitor your system, or just want a simpler way to bridge your code to Home Assistant, then you might find haco useful.

    "},{"location":"#how-it-works","title":"How it Works","text":"

    haco uses MQTT to communicate with Home Assistant. It automatically generates the discovery configurations required for Home Assistant to \"see\" your device and its entities. All you need to do is define a Device with some Controls and start the ClientHaco.

    "},{"location":"#documentation","title":"Documentation","text":"

    See Documentation

    "},{"location":"controls/","title":"Controls","text":"

    haco provides several control types that correspond to Home Assistant platforms. Each control typically has a state and a command method that you can override to handle communication.

    "},{"location":"controls/#supported-controls","title":"Supported Controls","text":""},{"location":"controls/#button","title":"Button","text":"

    A button in Home Assistant that can be pressed to trigger an action in your script.

    from haco import Button\n\nclass MyButton(Button):\n    def command(self, value):\n        print(\"Button was pressed!\")\n
    "},{"location":"controls/#switch","title":"Switch","text":"

    A toggle switch that can be turned on or off.

    from haco import Switch\n\nclass MySwitch(Switch):\n    def __init__(self, **kwargs):\n        super().__init__(**kwargs)\n        self._on = False\n\n    def state(self, value):\n        return self._on\n\n    def command(self, value):\n        self._on = value\n        print(f\"Switch is now {'ON' if self._on else 'OFF'}\")\n
    "},{"location":"controls/#sensor","title":"Sensor","text":"

    A read-only sensor that displays a value in Home Assistant.

    from haco import Sensor\n\nclass MySensor(Sensor):\n    def state(self, value):\n        return 42  # Or some dynamic value\n
    "},{"location":"controls/#number","title":"Number","text":"

    A slider or input box for numeric values.

    "},{"location":"controls/#select","title":"Select","text":"

    A dropdown list of options.

    "},{"location":"controls/#customizing-controls","title":"Customizing Controls","text":"

    Most controls accept common parameters in their constructor:

    Example:

    btn = Button(name=\"Panic Button\", icon=\"alert\")\n
    "},{"location":"controls/#advanced-custom-capabilities","title":"Advanced: Custom Capabilities","text":"

    For more complex platforms like climate, haco uses \"Capabilities\". A capability groups a state and a command topic. You can see how these are implemented in haco/climate.py.

    "},{"location":"quick-start/","title":"Quick start","text":"

    The easiest way to get started with haco is to define a simple device and run the client.

    "},{"location":"quick-start/#installation","title":"Installation","text":"

    haco can be installed via pip:

    pip install haco\n

    MQTT Broker Required

    haco communicates with Home Assistant via MQTT. Ensure you have an MQTT broker (like Mosquitto) running and accessible.

    "},{"location":"quick-start/#basic-usage","title":"Basic Usage","text":"

    Here is a minimal example that creates a device with a single button:

    import asyncio\nfrom haco import Button, Device, ClientHaco\n\nasync def main():\n    # 1. Define your controls\n    btn = Button(name=\"My Awesome Button\")\n\n    # 2. Group them into a device\n    device = Device(name=\"My Cool Device\", controls=[btn])\n\n    # 3. Create and start the client\n    # Replace 'mqtt.service' with your MQTT broker's address\n    client = ClientHaco(hostname='mqtt.service', device=device)\n\n    print(\"Starting haco client...\")\n    await client.start()\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n
    "},{"location":"quick-start/#what-happens-next","title":"What Happens Next?","text":"
    1. Discovery: When the script runs, it sends discovery messages to Home Assistant.
    2. **Entity Created **: A new device named \"My Cool Device\" will appear in Home Assistant with a button entity named \"My Awesome Button\".
    3. Control: When you press the button in the Home Assistant UI, haco will receive the command. You can then handle this command in your Python script by overriding the command method or providing a callback (see Control Types for more details).
    "},{"location":"changelog/0.3.0/","title":"0.3.0","text":""},{"location":"changelog/0.3.4/","title":"0.3.4","text":""},{"location":"changelog/0.4.3/","title":"0.4.3","text":""},{"location":"changelog/0.4.4/","title":"0.4.4","text":""}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"Home","text":"

    How Do I Get Started?

    See the Quick Start section.

    "},{"location":"#haco-home-assistant-control-objects","title":"haco Home Assistant Control Objects","text":"

    haco greatly simplifies the process of exposing Home Assistant controls (e.g. Pull-down Lists, Number Sliders, Sensors, etc.) from a device - and handling the communication between both sides.

    While the current implementation is in Python, the capability definitions for controls are designed to be shared across different languages. Support for additional languages (namely native support for Tasmota Berry) is planned.

    "},{"location":"#why-mqtt","title":"Why MQTT?","text":"

    You might wonder why we use MQTT instead of directly using Home Assistant's APIs. The reason is flexibility: using MQTT allows haco to target any device or environment that has an MQTT client, not just those that can easily make HTTP requests or run a full HA integration. This makes it ideal for lightweight embedded systems and cross-platform utility.

    "},{"location":"#why-would-i-want-such-a-thing","title":"Why Would I Want Such a Thing?","text":"

    Integrating custom hardware or scripts with Home Assistant often involves a lot of boilerplate: defining MQTT topics, crafting JSON payloads for discovery, and managing state updates. haco handles the heavy lifting, letting you define your device and its controls in clean, declarative Python.

    If you're building a custom IoT device, a script to monitor your system, or just want a simpler way to bridge your code to Home Assistant, then you might find haco useful.

    "},{"location":"#how-it-works","title":"How it Works","text":"

    haco uses MQTT to communicate with Home Assistant. It automatically generates the discovery configurations required for Home Assistant to \"see\" your device and its entities. All you need to do is define a Device with some Controls and start the ClientHaco.

    "},{"location":"#documentation","title":"Documentation","text":"

    See Documentation

    "},{"location":"controls/","title":"Controls","text":"

    haco provides several control types that correspond to Home Assistant platforms. Each control typically has a state and a command method that you can override to handle communication.

    "},{"location":"controls/#supported-controls","title":"Supported Controls","text":""},{"location":"controls/#button","title":"Button","text":"

    A button in Home Assistant that can be pressed to trigger an action in your script.

    from haco import Button\n\nclass MyButton(Button):\n    def command(self, value):\n        print(\"Button was pressed!\")\n
    "},{"location":"controls/#switch","title":"Switch","text":"

    A toggle switch that can be turned on or off.

    from haco import Switch\n\nclass MySwitch(Switch):\n    def __init__(self, **kwargs):\n        super().__init__(**kwargs)\n        self._on = False\n\n    def state(self, value):\n        return self._on\n\n    def command(self, value):\n        self._on = value\n        print(f\"Switch is now {'ON' if self._on else 'OFF'}\")\n
    "},{"location":"controls/#sensor","title":"Sensor","text":"

    A read-only sensor that displays a value in Home Assistant.

    from haco import Sensor\n\nclass MySensor(Sensor):\n    def state(self, value):\n        return 42  # Or some dynamic value\n
    "},{"location":"controls/#number","title":"Number","text":"

    A slider or input box for numeric values.

    "},{"location":"controls/#select","title":"Select","text":"

    A dropdown list of options.

    "},{"location":"controls/#customizing-controls","title":"Customizing Controls","text":"

    Most controls accept common parameters in their constructor:

    Example:

    btn = Button(name=\"Panic Button\", icon=\"alert\")\n
    "},{"location":"controls/#advanced-custom-capabilities","title":"Advanced: Custom Capabilities","text":"

    For more complex platforms like climate, haco uses \"Capabilities\". A capability groups a state and a command topic. You can see how these are implemented in haco/climate.py.

    "},{"location":"quick-start/","title":"Quick start","text":"

    The easiest way to get started with haco is to define a simple device and run the client.

    "},{"location":"quick-start/#installation","title":"Installation","text":"

    haco can be installed via pip:

    pip install haco\n

    MQTT Broker Required

    haco communicates with Home Assistant via MQTT. Ensure you have an MQTT broker (like Mosquitto) running and accessible.

    "},{"location":"quick-start/#basic-usage","title":"Basic Usage","text":"

    Here is a minimal example that creates a device with a single button:

    import asyncio\nfrom haco import Button, Device, ClientHaco\n\nasync def main():\n    # 1. Define your controls\n    btn = Button(name=\"My Awesome Button\")\n\n    # 2. Group them into a device\n    device = Device(name=\"My Cool Device\", controls=[btn])\n\n    # 3. Create and start the client\n    # Replace 'mqtt.service' with your MQTT broker's address\n    client = ClientHaco(hostname='mqtt.service', device=device)\n\n    print(\"Starting haco client...\")\n    await client.start()\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n
    "},{"location":"quick-start/#what-happens-next","title":"What Happens Next?","text":"
    1. Discovery: When the script runs, it sends discovery messages to Home Assistant.
    2. **Entity Created **: A new device named \"My Cool Device\" will appear in Home Assistant with a button entity named \"My Awesome Button\".
    3. Control: When you press the button in the Home Assistant UI, haco will receive the command. You can then handle this command in your Python script by overriding the command method or providing a callback (see Control Types for more details).
    "},{"location":"changelog/0.3.0/","title":"0.3.0","text":""},{"location":"changelog/0.3.4/","title":"0.3.4","text":""},{"location":"changelog/0.4.3/","title":"0.4.3","text":""},{"location":"changelog/0.4.4/","title":"0.4.4","text":""},{"location":"changelog/0.4.5/","title":"0.4.5","text":""}]} \ No newline at end of file