Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8b929e1
Improve API to closely follow device behaviour
p-monteiro Jul 9, 2026
6991717
Add support for humidity Control features
p-monteiro Jul 9, 2026
b71016b
Separate continuous mode to its own switch
p-monteiro Jul 14, 2026
ce57229
Revert: Move continuous back to Humidity Control select
p-monteiro Jul 20, 2026
df13f1f
Normalize entity creation
p-monteiro Jul 20, 2026
c2d06fc
Update gitignore
p-monteiro Aug 19, 2026
cd144d2
Prepare gitignore for homeassistant repo in devcontainer
p-monteiro Aug 20, 2026
e4b537c
Add DevContainer based on HA Core
p-monteiro Aug 20, 2026
ccf5b4b
Rework aiogree adding support to Gree Cloud devices
p-monteiro Aug 20, 2026
de88848
Initial adjustment of HA implementation to new aiogree
p-monteiro Aug 20, 2026
7ca15a9
Add i18n-ally to devcontainer and other fixes
p-monteiro Aug 26, 2026
7fedfe3
New Config Entry Version
p-monteiro Aug 26, 2026
9c559dc
More fixes for the devcontainer dependencies
p-monteiro Aug 28, 2026
24ecdad
Make integration platforms compatible with the new config data
p-monteiro Aug 28, 2026
075c1f3
Properly save config entry after IP recovery
p-monteiro Aug 29, 2026
b88b65b
Add support for reauth
p-monteiro Aug 29, 2026
7f2534e
Only connect to MQTT if required and cleanup at the end of init
p-monteiro Aug 29, 2026
6b8074a
Don't error full config entry if one device fails
p-monteiro Aug 29, 2026
9e142c4
Properly unload a config entry by cleaning up devices
p-monteiro Aug 29, 2026
daef7f6
use config_entry source to manage reconfigure and reauth
p-monteiro Aug 29, 2026
5c0a780
Fix typos, enhance discovery options, and improve translations
p-monteiro Sep 2, 2026
8f0cd5e
Fix transport creation to reflect user input
p-monteiro Sep 2, 2026
509ca84
When adding multiple devices allow prefill features from devices alre…
p-monteiro Sep 2, 2026
063348b
Add missing error string to translations
p-monteiro Sep 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "Gree HA Climate (dev)",

// mcr.microsoft.com/devcontainers/python already bundles zsh, Oh My Zsh,
// a non-root "vscode" user with sudo, git, and pipx - no need to layer
// the python/common-utils features on top of a bare base image.
//
// Match the Python version to whatever python_requires the *current*
// home-assistant/core pyproject.toml declares. Check before first build:
// https://github.com/home-assistant/core/blob/dev/pyproject.toml
// Available tags: https://mcr.microsoft.com/en-us/artifact/mar/devcontainers/python/tags
"image": "mcr.microsoft.com/devcontainers/python:3.14-bookworm",
"runArgs": ["--name", "ha-gree-dev"],

"postCreateCommand": "bash .devcontainer/postCreate.sh",

"forwardPorts": [8123],
"portsAttributes": {
"8123": {
"label": "Home Assistant",
"onAutoForward": "notify"
}
},

"customizations": {
"vscode": {
"extensions": [
"charliermarsh.ruff",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.pylint",
"ms-python.mypy-type-checker",
"redhat.vscode-yaml",
"esbenp.prettier-vscode",
"lokalise.i18n-ally"
],
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh",

"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
"python.terminal.activateEnvironment": true,
"python.analysis.enableEditableInstalls": true,

"pylint.path": ["${workspaceFolder}/.venv/bin/pylint"],
"mypy-type-checker.path": ["${workspaceFolder}/.venv/bin/mypy"]
}
}
},

"remoteUser": "vscode"
}
87 changes: 87 additions & 0 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/usr/bin/env bash
# Runs once when the devcontainer is created (or on "Rebuild Container").
set -euo pipefail

cd "$(dirname "$0")/.." # repo root

# Requirements mirrored from official HA Devcontainer
echo "==> Installing system dependencies"
sudo apt-get update
sudo apt-get install -y --no-install-recommends bluez ffmpeg libudev-dev libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev libpcap-dev libturbojpeg0 libyaml-dev libxml2 git cmake autoconf
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*

echo "==> Installing go2rtc binary (needed by default_config:, not available via apt)"
GO2RTC_ARCH="$(dpkg --print-architecture)" # amd64 | arm64
case "$GO2RTC_ARCH" in
amd64) GO2RTC_ASSET="go2rtc_linux_amd64" ;;
arm64) GO2RTC_ASSET="go2rtc_linux_arm64" ;;
*) echo " (unrecognized arch '$GO2RTC_ARCH', skipping go2rtc install)"; GO2RTC_ASSET="" ;;
esac
if [ -n "$GO2RTC_ASSET" ]; then
sudo curl -fL "https://github.com/AlexxIT/go2rtc/releases/latest/download/${GO2RTC_ASSET}" \
-o /usr/local/bin/go2rtc
sudo chmod +x /usr/local/bin/go2rtc
fi

echo "==> Ensuring Python virtual environment exists"

if [ -d ".venv" ]; then
echo "==> Reusing existing virtual environment"
else
echo "==> Creating new virtual environment"
python3 -m venv .venv
fi

echo "==> Activate VENV"
source .venv/bin/activate

echo "==> Upgrading pip/setuptools/wheel"
python -m pip install --upgrade pip setuptools wheel


HA_SRC_DIR=".ha-core"

echo "==> Ensuring Home Assistant core is available"
./.devcontainer/setup-ha-repo.sh

echo "==> Installing Home Assistant"
./.devcontainer/setup-ha-core.sh

echo "==> Compiling Home Assistant translations"
(
cd $HA_SRC_DIR || exit 1
python -m script.translations develop --all
)

echo "==> Installing dev/lint tooling"
if [ -f requirements_dev.txt ]; then
python -m pip install --upgrade -r requirements_dev.txt
fi

echo "==> Wiring up config/custom_components -> ../custom_components"
mkdir -p config
if [ ! -e config/custom_components ]; then
ln -s ../custom_components config/custom_components
fi

echo "==> Ensuring config/configuration.yaml exists"
if [ ! -f config/configuration.yaml ]; then
# Let Home Assistant itself generate the default config directory/files -
# this is what "hass --script ensure_config" is for, and it's what
# integration_blueprint's own setup script does too. Beats hand-writing
# a configuration.yaml that can drift from what core actually defaults to.
python -m homeassistant --script ensure_config --config config

# Add debug logging for custom_components on top of the generated default.
cat >> config/configuration.yaml <<'YAML'

# Added by postCreate.sh
logger:
default: info
logs:
custom_components: debug
YAML
fi

echo "==> Done. Run the 'Run Home Assistant' task, or press F5, to start."
34 changes: 34 additions & 0 deletions .devcontainer/setup-ha-core.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname "$0")/.."

export UV_CACHE_DIR="$PWD/.uv-cache"
HA_SRC_DIR="${HA_SRC_DIR:-.ha-core}"
VENV_DIR="${VENV_DIR:-.venv}"

PYTHON="$VENV_DIR/bin/python"

if [ ! -x "$PYTHON" ]; then
echo "ERROR: Python virtual environment not found at $VENV_DIR"
exit 1
fi

if [ ! -d "$HA_SRC_DIR" ]; then
echo "ERROR: Home Assistant core directory '$HA_SRC_DIR' does not exist."
exit 1
fi

echo "==> Installing Home Assistant core requirements"

"$PYTHON" -m pip install --no-cache-dir \
"uv==$(awk -F'==' '/^uv==/{print $2}' "$HA_SRC_DIR/requirements.txt")"

"$PYTHON" -m uv pip install --upgrade colorlog

"$PYTHON" -m uv pip install -r "$HA_SRC_DIR/requirements.txt"
"$PYTHON" -m uv pip install -r "$HA_SRC_DIR/requirements_test.txt"
"$PYTHON" -m uv pip install -r "$HA_SRC_DIR/requirements_all.txt"

echo "==> Installing Home Assistant core"
"$PYTHON" -m uv pip install --upgrade --no-cache-dir --editable "$HA_SRC_DIR" --config-settings editable_mode=compat
17 changes: 17 additions & 0 deletions .devcontainer/setup-ha-repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname "$0")/.."

HA_SRC_DIR="${HA_SRC_DIR:-.ha-core}"

if [ -d "$HA_SRC_DIR/.git" ]; then
echo "==> Home Assistant core already cloned, updating"
git -C "$HA_SRC_DIR" fetch --depth 1 origin dev
git -C "$HA_SRC_DIR" checkout dev
git -C "$HA_SRC_DIR" reset --hard origin/dev
else
echo "==> Cloning Home Assistant core from the 'dev' branch"
git clone --progress --depth 1 --branch dev \
https://github.com/home-assistant/core.git "$HA_SRC_DIR"
fi
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
.idea/
__pycache__/
.venv/
.mypy_cache/
.ruff_cache/
config/
.ha-core/
.uv-cache/
Loading
Loading