From 7465de4b55ad5a10d32f14ee7ae2fc82eebe925d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Thu, 27 Aug 2026 23:01:18 +0200 Subject: [PATCH] v0.8.1 --- BUILD_REPORT.md | 20 +++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- FILE_MANIFEST.sha256 | 12 +++++------ README.md | 4 ++-- .../gree_controller/manifest.json | 2 +- src/engine.rs | 16 ++++++++------- 7 files changed, 40 insertions(+), 18 deletions(-) diff --git a/BUILD_REPORT.md b/BUILD_REPORT.md index e721314..a8c7a3b 100644 --- a/BUILD_REPORT.md +++ b/BUILD_REPORT.md @@ -1,3 +1,23 @@ +# GREE Controller v0.8.1 - build and validation report + +## 0.8.1 Rust borrow-checker hotfix + +Version 0.8.1 is a compile-only hotfix for the 0.8.0 ownership release. It does not change controller behavior. Two mode-selection values in `src/engine.rs` borrowed `zone.mode` as `&str` across `refresh_control_ownership(&mut zone, ...)`, which Rust correctly rejected with E0502. Both paths now clone the selected mode into an owned `String` before the mutable ownership refresh and create the `&str` view only afterwards. + +The affected paths are the live thermostat engine loop and `/api/control-plan` construction. No persisted schema, API field, ownership rule, thermostat decision, lockout rule or Home Assistant entity semantics changed. + +### Validation available in this environment + +- Confirmed both E0502 source patterns are removed and no `zone.mode.as_str()` borrow is held across `refresh_control_ownership(&mut zone, ...)`. +- `node --check` passed for Web JavaScript. +- All JSON files parse successfully. +- Python Home Assistant integration and helper scripts pass `py_compile`. +- Shell scripts pass `bash -n`. +- Version consistency checked for Cargo package, Cargo lock root package, README and Home Assistant manifest. +- This packaging container still has no `cargo`, `rustc` or `rustfmt`; therefore the target-host update script remains the authoritative Rust compile/test gate and must run `cargo test --all-targets` and `cargo build --release` before replacing the service. + +--- + # GREE Controller v0.8.0 - build and validation report ## 0.8.0 ownership/concurrency/safety release diff --git a/Cargo.lock b/Cargo.lock index 0b1b37f..dded5e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -633,7 +633,7 @@ dependencies = [ [[package]] name = "gree-controller" -version = "0.8.0" +version = "0.8.1" dependencies = [ "aes", "aes-gcm", diff --git a/Cargo.toml b/Cargo.toml index ad8fc9a..e8e6ab7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gree-controller" -version = "0.8.0" +version = "0.8.1" edition = "2021" authors = ["GREE Controller contributors"] description = "Standalone local GREE HVAC controller with Web UI, SQLite and Home Assistant sensor support" diff --git a/FILE_MANIFEST.sha256 b/FILE_MANIFEST.sha256 index 69cb804..9eeb0b5 100644 --- a/FILE_MANIFEST.sha256 +++ b/FILE_MANIFEST.sha256 @@ -1,10 +1,10 @@ d67af429e4da9ce08e9d2f2a8472849ffbd70d135b1c5da535a076026794d04c ./.env.example a4ec3874a2e3ab1bad28fb40bb620f7b01f64d01ad9b699306bf70ada31227db ./.gitignore -06e42aabd06d4ef09df25ae15f8852154048f6d0b0a5cd8fb44ff0ffb0e118ea ./BUILD_REPORT.md -938bb478339eb1a2f27a4e049e208fb507ab94b538e37b9e639cbcb9c1ac97df ./Cargo.lock -2cbea84c5ae579cfee7000cd25139288ec468fc2e94eeb7e26984a82b1fa7e8a ./Cargo.toml +4b11d1d60ebbdbfc91c6caef4907559d29a096e7a000f75a74b9db58ee56ff44 ./BUILD_REPORT.md +13e555cc191550f5d09e87dc0f041bbbae55c4fc70afe98e1398c44b99e1a3d0 ./Cargo.lock +c1cb0011d206c38dd84d7d3668c58998ecb3eb95afd7ae64a62d4b1ddd5bf614 ./Cargo.toml 19b2943504acb8f8de280f873a8dbec4bb6ebbe3870b158f5655d4fb8c298f5f ./LICENSE -44218c5dcd772cd58d0dc10a99b7b02ef84b6ba7fe68870995c4e22e3047b2c4 ./README.md +14fa3424666b9805ee65b1744e9ac0cef449339adec17e451bd68182d8ea74d2 ./README.md f2c8eb28fedb26bb8f5636e1805e7a782cc472b87d882f6752d520f16216a248 ./build.rs 3f774fbdc32de8f437d7cf9c1ceb2ae195c674d0f48b8891b25cf36d152ee2c4 ./docs/API.md 234dd200e380a13ecd3e61b4ea455f6f08d64ce89382077dee80684acadb9703 ./docs/HOME_ASSISTANT_MIGRATION.md @@ -24,7 +24,7 @@ ab08fbe40e9bb48ebcbfff98760aaa0c9434b61b705aaaadea0c09c255d99b0e ./home-assista 5a96fe8f5c035c34f1339370270cd078056202d09e236dec75735be11de92a7d ./home-assistant/custom_components/gree_controller/entity_map.py c4fb75c246db651087900ebfc2291ff41ac87652cd6194fc0b776b0005c1cbcf ./home-assistant/custom_components/gree_controller/icon.png c4fb75c246db651087900ebfc2291ff41ac87652cd6194fc0b776b0005c1cbcf ./home-assistant/custom_components/gree_controller/logo.png -4f7a62c909a836b10d8b2c86685e156e785b97d2b8d3466a97698c41e0005302 ./home-assistant/custom_components/gree_controller/manifest.json +559f47833e772277016976da5e1b717468083203f6e15a83b6c66f6d52992fbc ./home-assistant/custom_components/gree_controller/manifest.json 38d659d0273c0d1428679e44574a2666c605d1b3796d323b626baa40560788cf ./home-assistant/custom_components/gree_controller/number.py 39c4309001b75abb56234f05662bc06e077054986876f1927937edbce528ec95 ./home-assistant/custom_components/gree_controller/select.py 1cae12876eb81085910907cf1fcf340a18dcba4f8c967ef222c9496325057849 ./home-assistant/custom_components/gree_controller/sensor.py @@ -50,7 +50,7 @@ b50782b3742dfbf8a319c60571c968e93fdf8547db747c759edcffae68cb98bf ./scripts/upda 723c2c18245079c44b24e66d738dd77a3e6b4d2ac934f2329b7cc7ae62f7a2e3 ./src/api.rs 32b1d0a7ac2060fd18fe7f1ca1d110ee45beaf67e81514d24d6bde3d36301387 ./src/config.rs 5dfda2f4dc540c502885b0cd7017dc77768684588acf528f01d1fd88f1af4aec ./src/db.rs -c935a7b3e136a314c626d8e01da9613a56c7545db3868124b8640d7b1db63d79 ./src/engine.rs +3f70c6cf618c8dbf5744876a611e2fd8d9be6362c25e680dee55a23eaef93b08 ./src/engine.rs 4b271b6fc365b1078c01d6178eb563841b2ecaed5d8639196f58e1312d2236fe ./src/error.rs fbe5b18bfe1a8298c99850bfab54c2bf13c1824c0df40669ad52eff125aab964 ./src/home_assistant.rs 190b0a33431539676e5dd7796698077f16c179d42eae4501ca96a91bf797cbf8 ./src/influxdb.rs diff --git a/README.md b/README.md index 91b8aa6..0c4cc47 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Standalone local GREE air-conditioner controller written in Rust. It runs on a regular Linux host or an LXC container and provides a mobile-first web interface without depending on the vendor cloud. -Current version: **0.8.0**. +Current version: **0.8.1**. ## Highlights @@ -47,7 +47,7 @@ See [`BUILD_REPORT.md`](BUILD_REPORT.md) for package validation details and [`do On Debian, Ubuntu or an LXC container: ```bash -unzip gree-controller-v0.8.0.zip +unzip gree-controller-v0.8.1.zip cd gree-controller chmod +x scripts/*.sh ./scripts/dev.sh diff --git a/home-assistant/custom_components/gree_controller/manifest.json b/home-assistant/custom_components/gree_controller/manifest.json index c31a992..ece2ab4 100644 --- a/home-assistant/custom_components/gree_controller/manifest.json +++ b/home-assistant/custom_components/gree_controller/manifest.json @@ -1,7 +1,7 @@ { "domain": "gree_controller", "name": "GREE Controller", - "version": "0.8.0", + "version": "0.8.1", "config_flow": true, "integration_type": "hub", "iot_class": "local_polling", diff --git a/src/engine.rs b/src/engine.rs index 2af6735..aac4732 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -1235,15 +1235,16 @@ async fn control_zones(state: &AppState) -> Result<()> { // House "off" means the smart thermostat does not control inherited zones. // A zone explicitly switched to heat/cool remains independent and may still run. - let effective_mode = if zone.inherit_house_mode { - settings.house_mode.as_str() + let effective_mode_owned = if zone.inherit_house_mode { + settings.house_mode.clone() } else { - zone.mode.as_str() + zone.mode.clone() }; - zone.effective_mode = effective_mode.to_string(); + zone.effective_mode = effective_mode_owned.clone(); let ownership_blocked_by_group = zone.local_thermostat_power != Some(true) && groups.iter().any(|group| !group.power_enabled && group.zone_ids.iter().any(|zone_id| zone_id == &zone.id)); refresh_control_ownership(&mut zone, settings.house_power_enabled, ownership_blocked_by_group); + let effective_mode = effective_mode_owned.as_str(); let previous_source = zone.control_temperature_source.clone(); // Never feed the thermostat a cached GREE temperature after any communication @@ -2030,14 +2031,15 @@ pub async fn build_control_plan(state: &AppState) -> Result