Architectural introduction - ha-warmup/warmup GitHub Wiki

Architectural introduction

There are (or will be) 3 different forms of this software:

  • a custom_component called warmup_cc
  • a Home Assistant integrated component called warmup
  • a Python Package called warmup4ie

Historically

This software is derived from https://github.com/alex-0103/warmup4IE Home Assistant Custom Component that was inspired by https://github.com/alyc100/SmartThingsPublic/blob/master/devicetypes/alyc100/warmup-4ie.src/warmup-4ie.groovy SmartThings Integration

Custom Component

This is the way this current project operates, because it is simplest for us if the user has to perform the installation themselves.

HACS inclusion?

We should consider what might be involved in incorporating this project into HACS although there is a risk that this would detract from full integration as below.

HA Integrated Component

Work has begun to investigate how to do this, based on the Developer Documentation and an initial scaffold has been generated to investigate the next steps.

When it comes to raising a Pull Request (PR) for the HA core we will actually need two: one for the Code and one for the Documentation. To help understand the process it might be useful to review Alex's previous code PR and his accompanying documentation PR

We need to understand how we will be informed of potentially breaking changes by the upstream developers

You may be interested to read about [how the terminology in HA has shifted] and also bear in mind the impact of 'Simple Mode' on integrations in the future.

PyPI package

The Python Package Index (PyPI) is the most commonly used means of downloading libraries within the global Python user community. According to the basic principles of development within Home Assistant we should 'not include any protocol specific code'. Therefore we must ensure that the protocol specific code for interacting with the Warmup API is published into a standalone Python library made available via PyPI`.

As of 12 Jan 2020 the latest release in https://pypi.org/project/warmup4ie/ is v0.1.5 from May 2019, and this is @alex0103 's repo

At some point we may need to switch to publish this from our own repo under this team account.

For further information on our Warmup PyPi package see PyPI package

Common elements

It is possible that, especially early on, there may be some elements of these different components that will contain the same content. For instance, the Python library might be contained inside the custom component. We need to manage the release of these carefully, to avoid issues and complications.

⚠️ **GitHub.com Fallback** ⚠️