From 259f3a2c3495779625f834829bafc6679ff3aec5 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Tue, 17 Jun 2025 08:23:50 +0100 Subject: [PATCH 01/27] Update __main__.py Added temp_step, required to allow FGL AC units to adjust in 0.5C increments using the standard HA thermostat card. --- aircon/__main__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aircon/__main__.py b/aircon/__main__.py index e49d841..0fa30df 100644 --- a/aircon/__main__.py +++ b/aircon/__main__.py @@ -211,6 +211,7 @@ async def run(parsed_args): }, ], 'precision': device.get_temp_precision(), + 'temp_step': 1 if device.is_fahrenheit else 0.5, 'temperature_unit': 'F' if device.is_fahrenheit else 'C' } topics = device.topics From fc428b5b1d82e39f0750cc87c08d8e72e01215d0 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 13:53:32 +0100 Subject: [PATCH 02/27] Update README.md --- hassio/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hassio/README.md b/hassio/README.md index 2cd85bb..84bfedb 100644 --- a/hassio/README.md +++ b/hassio/README.md @@ -4,7 +4,7 @@ ## About -Use this add-on to add support for Hisense Air Conditioners. See [here](https://github.com/xury77/AirCon) for more details. +Use this add-on to add support for Hisense Air Conditioners. See [here](https://github.com/sarbuk/AirCon/) for more details. [aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg [amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg From fa4d7f04e89a8f0aac5a3711fba922eba9bc2f56 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 14:53:02 +0100 Subject: [PATCH 03/27] Update __main__.py Enforced temp_step 0.5 regardless of whether F or C. --- aircon/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aircon/__main__.py b/aircon/__main__.py index 0fa30df..86d17e8 100644 --- a/aircon/__main__.py +++ b/aircon/__main__.py @@ -211,7 +211,7 @@ async def run(parsed_args): }, ], 'precision': device.get_temp_precision(), - 'temp_step': 1 if device.is_fahrenheit else 0.5, + 'temp_step': 0.5, 'temperature_unit': 'F' if device.is_fahrenheit else 'C' } topics = device.topics From b458290b03a2ba9c017932510883f5237789776b Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 16:22:22 +0100 Subject: [PATCH 04/27] Update repository.json --- repository.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository.json b/repository.json index b94a3b7..c512123 100644 --- a/repository.json +++ b/repository.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Add-on: HiSense Air Conditioners", - "url": "https://github.com/xury77/AirCon", - "maintainer": "Xury77 xury@poczta.onet.pl" + "url": "https://github.com/sarbuk/AirCon", + "maintainer": "sarbuk" } From 7f4cc2510f36189c1cc99bb15ea7c7bea284f24f Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 16:50:53 +0100 Subject: [PATCH 05/27] Update config.json --- hassio/config.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hassio/config.json b/hassio/config.json index ab54d7e..a62e577 100644 --- a/hassio/config.json +++ b/hassio/config.json @@ -1,10 +1,10 @@ { "name": "HiSense Air Conditioners", - "version": "0.3.24", + "version": "0.3.27", "slug": "hisense_ac", "description": "Interface for controlling Air Conditioners, e.g. with HiSense modules.", - "url": "https://github.com/xury77/AirCon", - "image": "ghcr.io/xury77/aircon", + "url": "https://github.com/sarbuk/AirCon", + "image": "ghcr.io/sarbuk/aircon", "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"], "startup": "application", "boot": "auto", From 0cafd5bc6cb2cc23c5f0c57446e729e7a489f0f1 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 16:51:17 +0100 Subject: [PATCH 06/27] Update DOCS.md --- hassio/DOCS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hassio/DOCS.md b/hassio/DOCS.md index 9fc9572..a36f6be 100644 --- a/hassio/DOCS.md +++ b/hassio/DOCS.md @@ -13,7 +13,7 @@ # Configuration 1. Find your application code from the list - [here](https://github.com/xury77/AirCon#prerequisites). + [here](https://github.com/sarbuk/AirCon#prerequisites). 1. Set the configuration as follows: ```yaml app: From f4636cfd13926e78fa892dffcd506224be875dc6 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 16:52:33 +0100 Subject: [PATCH 07/27] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6eb170..5c9bf35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. Dates are displayed in UTC. +#### [0.3.24](https://github.com/xury77/AirCon/compare/0.3.23...0.3.24) +> 25 June 2025 + +- add temp_step = 0.5 to allow half degree increments in HA +- other changes due to forking from xury77 + #### [0.3.24](https://github.com/xury77/AirCon/compare/0.3.23...0.3.24) > 18 November 2024 From 472f90bf2312b5301e3d93c5a8f28545321e103c Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 16:53:06 +0100 Subject: [PATCH 08/27] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c9bf35..7dce522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. Dates are displayed in UTC. -#### [0.3.24](https://github.com/xury77/AirCon/compare/0.3.23...0.3.24) +#### [0.3.27](https://github.com/sarbuk/AirCon/compare/0.3.24...0.3.27) > 25 June 2025 - add temp_step = 0.5 to allow half degree increments in HA From ba2f395446b87f5adffaa7c31b6e7862c70d2263 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 16:54:09 +0100 Subject: [PATCH 09/27] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6cb9b82..87b6804 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ description='Interface for controlling Air Conditioners, e.g. with HiSense modules.', long_description=long_description, long_description_content_type='text/markdown', - url='https://github.com/xury77/AirCon', + url='https://github.com/sarbuk/AirCon', author='Dror Eiger', author_email='droreiger@gmail.com', license='GPL 3.0', From 0457b995bb7eb27bb7007b2d3bfae0a0506c5769 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 16:54:41 +0100 Subject: [PATCH 10/27] Update docker-compose.yaml --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 6a3e366..86b1b23 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -10,7 +10,7 @@ services: hisense_ac: depends_on: - copy_config - image: ghcr.io/xury77/aircon:0.3.24 + image: ghcr.io/sarbuk/aircon:0.3.27 container_name: hisense_ac healthcheck: disable: true From 7657118563a5735cf75c7df0e374ada1ca91e740 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 16:56:47 +0100 Subject: [PATCH 11/27] Update new_version.sh --- new_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new_version.sh b/new_version.sh index 8287e92..b79474e 100755 --- a/new_version.sh +++ b/new_version.sh @@ -46,6 +46,6 @@ git tag -d "$NEW_VERSION" git tag -a "$NEW_VERSION" -m "$NEW_VERSION_MSG" docker buildx rm --all-inactive --force docker buildx create --name multiarch --driver docker-container --use || true -docker buildx build --platform linux/arm/v7,linux/arm64,linux/amd64,linux/386 -t xury77/aircon:$NEW_VERSION --push . +docker buildx build --platform linux/arm/v7,linux/arm64,linux/amd64,linux/386 -t sarbuk/aircon:$NEW_VERSION --push . git push git push --tags From e991068874e9f6508a8e224a7509ec985e85976a Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 16:58:37 +0100 Subject: [PATCH 12/27] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cdc3379..aad26a7 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ If using [HomeAssistant], this is the preferred method. 1. In the HomeAssistant UI, enter **Supervisor → Add-on Store**. 1. Click **⋮ menu → Repositories**. -1. Add `https://github.com/xury77/AirCon` to the list. +1. Add `https://github.com/sarbuk/AirCon` to the list. 1. Choose **HiSense Air Conditioner** and install it. 1. Update the configuration as detailed within the add-on. 1. Start the add-on. Do not forget to enable **Start on boot** and **Watchdog**. From b98be5da7728c2b1a0135873fdee6aa8c19bb1ac Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:05:54 +0100 Subject: [PATCH 13/27] Update config.json --- hassio/config.json | 1 - 1 file changed, 1 deletion(-) diff --git a/hassio/config.json b/hassio/config.json index a62e577..f24cca3 100644 --- a/hassio/config.json +++ b/hassio/config.json @@ -4,7 +4,6 @@ "slug": "hisense_ac", "description": "Interface for controlling Air Conditioners, e.g. with HiSense modules.", "url": "https://github.com/sarbuk/AirCon", - "image": "ghcr.io/sarbuk/aircon", "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"], "startup": "application", "boot": "auto", From bd823c55a61c0562c5515eec753a77947d1463ba Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:09:50 +0100 Subject: [PATCH 14/27] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dce522..a935cb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. Dates are displayed in UTC. -#### [0.3.27](https://github.com/sarbuk/AirCon/compare/0.3.24...0.3.27) +#### [0.3.28](https://github.com/sarbuk/AirCon/compare/0.3.24...0.3.28) > 25 June 2025 - add temp_step = 0.5 to allow half degree increments in HA From 82176c6c1eb311a4c828d4b0d9f813a994d2d002 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:10:20 +0100 Subject: [PATCH 15/27] Update config.json --- hassio/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hassio/config.json b/hassio/config.json index f24cca3..bf587e0 100644 --- a/hassio/config.json +++ b/hassio/config.json @@ -1,6 +1,6 @@ { "name": "HiSense Air Conditioners", - "version": "0.3.27", + "version": "0.3.28", "slug": "hisense_ac", "description": "Interface for controlling Air Conditioners, e.g. with HiSense modules.", "url": "https://github.com/sarbuk/AirCon", From 4aab87f1f0ddc8c6e594ba46c7591bff3ef43086 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:13:22 +0100 Subject: [PATCH 16/27] Update docker-compose.yaml --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 86b1b23..04c3e2c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -10,7 +10,7 @@ services: hisense_ac: depends_on: - copy_config - image: ghcr.io/sarbuk/aircon:0.3.27 + build: . container_name: hisense_ac healthcheck: disable: true From b06dc8edd386a3ffc0a147d9060e2fe9480c3186 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:23:22 +0100 Subject: [PATCH 17/27] Update config.json --- hassio/config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hassio/config.json b/hassio/config.json index bf587e0..4b2fef4 100644 --- a/hassio/config.json +++ b/hassio/config.json @@ -1,10 +1,11 @@ { "name": "HiSense Air Conditioners", - "version": "0.3.28", + "version": "0.3.29", "slug": "hisense_ac", "description": "Interface for controlling Air Conditioners, e.g. with HiSense modules.", "url": "https://github.com/sarbuk/AirCon", "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"], + "build": true, "startup": "application", "boot": "auto", "host_network": true, From bd0ab7449fc9ed27495e11504a92f0116794976f Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:23:56 +0100 Subject: [PATCH 18/27] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a935cb5..16b2c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. Dates are displayed in UTC. -#### [0.3.28](https://github.com/sarbuk/AirCon/compare/0.3.24...0.3.28) +#### [0.3.29](https://github.com/sarbuk/AirCon/compare/0.3.24...0.3.29) > 25 June 2025 - add temp_step = 0.5 to allow half degree increments in HA From 840ecffe640268a15591d51829c7d4844e28fe32 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 21:38:58 +0100 Subject: [PATCH 19/27] Create config.json moving from hassio/config.json --- config.json | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 config.json diff --git a/config.json b/config.json new file mode 100644 index 0000000..4b2fef4 --- /dev/null +++ b/config.json @@ -0,0 +1,44 @@ +{ + "name": "HiSense Air Conditioners", + "version": "0.3.29", + "slug": "hisense_ac", + "description": "Interface for controlling Air Conditioners, e.g. with HiSense modules.", + "url": "https://github.com/sarbuk/AirCon", + "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"], + "build": true, + "startup": "application", + "boot": "auto", + "host_network": true, + "map": ["config:rw"], + "discovery": ["mqtt"], + "services": ["mqtt:want"], + "environment": { + "CONFIG_DIR": "/config/hisense", + "OPTIONS_FILE": "/data/options.json" + }, + "options": { + "log_level": "INFO", + "mqtt_host": "core-mosquitto", + "mqtt_port": 1883, + "mqtt_user": null, + "mqtt_pass": null, + "port": null + }, + "schema": { + "app": [ + { + "username": "str", + "password": "str", + "code": "str" + } + ], + "log_level": "list(CRITICAL|ERROR|WARNING|INFO|DEBUG)?", + "mqtt_host": "str?", + "mqtt_port": "port?", + "mqtt_user": "str?", + "mqtt_pass": "str?", + "port": "port", + "local_ip": "str?", + "temp_type": "str?" + } +} From aa21328164f753e81f1a5f922e20d85b73ea82ae Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Wed, 25 Jun 2025 21:39:23 +0100 Subject: [PATCH 20/27] Delete hassio/config.json --- hassio/config.json | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 hassio/config.json diff --git a/hassio/config.json b/hassio/config.json deleted file mode 100644 index 4b2fef4..0000000 --- a/hassio/config.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "HiSense Air Conditioners", - "version": "0.3.29", - "slug": "hisense_ac", - "description": "Interface for controlling Air Conditioners, e.g. with HiSense modules.", - "url": "https://github.com/sarbuk/AirCon", - "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"], - "build": true, - "startup": "application", - "boot": "auto", - "host_network": true, - "map": ["config:rw"], - "discovery": ["mqtt"], - "services": ["mqtt:want"], - "environment": { - "CONFIG_DIR": "/config/hisense", - "OPTIONS_FILE": "/data/options.json" - }, - "options": { - "log_level": "INFO", - "mqtt_host": "core-mosquitto", - "mqtt_port": 1883, - "mqtt_user": null, - "mqtt_pass": null, - "port": null - }, - "schema": { - "app": [ - { - "username": "str", - "password": "str", - "code": "str" - } - ], - "log_level": "list(CRITICAL|ERROR|WARNING|INFO|DEBUG)?", - "mqtt_host": "str?", - "mqtt_port": "port?", - "mqtt_user": "str?", - "mqtt_pass": "str?", - "port": "port", - "local_ip": "str?", - "temp_type": "str?" - } -} From 190d5131e7fecc3a8649cba0ba8aa25f184c7b29 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Thu, 26 Jun 2025 11:33:28 +0100 Subject: [PATCH 21/27] Additional topics added economy_mode, powerful_mode, af_vertical_direction and outdoor_temperature --- aircon/__main__.py | 63 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/aircon/__main__.py b/aircon/__main__.py index 86d17e8..48d7f60 100644 --- a/aircon/__main__.py +++ b/aircon/__main__.py @@ -255,6 +255,69 @@ async def run(parsed_args): mqtt_client.publish(mqtt_topics['discovery'].format(device.mac_address), payload=json.dumps(config), retain=True) + if 'economy_mode' in topics: + mqtt_client.publish( + f"{parsed_args.mqtt_discovery_prefix}/switch/{device.mac_address}/economy_mode/config", + payload=json.dumps({ + "name": f"{device.name} Economy Mode", + "unique_id": f"{device.mac_address}_economy_mode", + "state_topic": mqtt_topics['pub'].format(device.mac_address, topics['economy_mode']), + "command_topic": mqtt_topics['sub'].format(device.mac_address, topics['economy_mode']), + "payload_on": "ON", + "payload_off": "OFF", + "availability": [{"topic": mqtt_topics['lwt']}], + "device": config["device"] + }), + retain=True + ) + + if 'powerful_mode' in topics: + mqtt_client.publish( + f"{parsed_args.mqtt_discovery_prefix}/switch/{device.mac_address}/powerful_mode/config", + payload=json.dumps({ + "name": f"{device.name} Powerful Mode", + "unique_id": f"{device.mac_address}_powerful_mode", + "state_topic": mqtt_topics['pub'].format(device.mac_address, topics['powerful_mode']), + "command_topic": mqtt_topics['sub'].format(device.mac_address, topics['powerful_mode']), + "payload_on": "ON", + "payload_off": "OFF", + "availability": [{"topic": mqtt_topics['lwt']}], + "device": config["device"] + }), + retain=True + ) + + if 'af_vertical_direction' in topics: + mqtt_client.publish( + f"{parsed_args.mqtt_discovery_prefix}/number/{device.mac_address}/af_vertical_direction/config", + payload=json.dumps({ + "name": f"{device.name} Vertical Airflow", + "unique_id": f"{device.mac_address}_af_vertical_direction", + "state_topic": mqtt_topics['pub'].format(device.mac_address, topics['af_vertical_direction']), + "command_topic": mqtt_topics['sub'].format(device.mac_address, topics['af_vertical_direction']), + "min": 1, + "max": 4, + "step": 1, + "availability": [{"topic": mqtt_topics['lwt']}], + "device": config["device"] + }), + retain=True + ) + + if 'outdoor_temperature' in topics: + mqtt_client.publish( + f"{parsed_args.mqtt_discovery_prefix}/sensor/{device.mac_address}/outdoor_temperature/config", + payload=json.dumps({ + "name": f"{device.name} Outdoor Temperature", + "unique_id": f"{device.mac_address}_outdoor_temperature", + "state_topic": mqtt_topics['pub'].format(device.mac_address, topics['outdoor_temperature']), + "unit_of_measurement": "°C", + "device_class": "temperature", + "availability": [{"topic": mqtt_topics['lwt']}], + "device": config["device"] + }), + retain=True + ) device.add_property_change_listener(mqtt_client.mqtt_publish_update) async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(connect=5.0)) as session: From 4a53d3ba3a8e609e441fed110a7da41c55e47b42 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Thu, 26 Jun 2025 12:08:57 +0100 Subject: [PATCH 22/27] Update config.json --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index 4b2fef4..17a3c58 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,6 @@ { "name": "HiSense Air Conditioners", - "version": "0.3.29", + "version": "0.3.30", "slug": "hisense_ac", "description": "Interface for controlling Air Conditioners, e.g. with HiSense modules.", "url": "https://github.com/sarbuk/AirCon", From 362e6ac1c66fc191865d70a5f81d5bc52ef69e77 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Thu, 26 Jun 2025 12:12:42 +0100 Subject: [PATCH 23/27] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16b2c9f..f919b8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. Dates are displayed in UTC. +#### [0.3.30](https://github.com/sarbuk/AirCon/compare/0.3.29...0.3.30) +> 26 June 2025 + +- added additional definitions in ```__main__.py``` to expose additional topics for the following, outside of the HA climate control: + - economy_mode [switch] + - powerful_mode [switch] + - af_vertical_direction [integer 1-4] + - outdoor_temperature [sensor] + #### [0.3.29](https://github.com/sarbuk/AirCon/compare/0.3.24...0.3.29) > 25 June 2025 From 885fdd7c2a67dd208c4ffe4b5473aa7b7cf7a226 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:15:36 +0100 Subject: [PATCH 24/27] Update __init__.py --- aircon/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aircon/__init__.py b/aircon/__init__.py index cf6614f..015e62e 100644 --- a/aircon/__init__.py +++ b/aircon/__init__.py @@ -1,2 +1,2 @@ from . import * -__version__ = '0.3.24' +__version__ = '0.3.31' From f74740d81835f65c6a25fdac3dddce9eba9443a6 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:40:46 +0100 Subject: [PATCH 25/27] Update __main__.py --- aircon/__main__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/aircon/__main__.py b/aircon/__main__.py index 48d7f60..4990adf 100644 --- a/aircon/__main__.py +++ b/aircon/__main__.py @@ -192,6 +192,7 @@ async def run(parsed_args): mqtt_client.will_set(mqtt_topics['lwt'], payload='offline', retain=True) mqtt_client.connect(parsed_args.mqtt_host, parsed_args.mqtt_port) mqtt_client.publish(mqtt_topics['lwt'], payload='online', retain=True) + print(f"[DEBUG] Devices loaded: {len(devices)}", file=sys.stderr) for device in devices: config = { 'unique_id': device.mac_address, @@ -215,6 +216,17 @@ async def run(parsed_args): 'temperature_unit': 'F' if device.is_fahrenheit else 'C' } topics = device.topics + # [PATCH] Extend topics manually for known-but-omitted features + fallback_keys = [ + 'economy_mode', + 'powerful_mode', + 'af_vertical_direction', + 'outdoor_temperature', + ] + for key in fallback_keys: + if key not in topics: + topics[key] = key + print(f"[DEBUG] Patched topics for {device.name}: {topics.keys()}", file=sys.stderr) if 'env_temp' in topics: config['current_temperature_topic'] = mqtt_topics['pub'].format( device.mac_address, topics['env_temp']) From 29aa6d9ec5de6e342911fa09367d9d26e33d3f0e Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:43:33 +0100 Subject: [PATCH 26/27] Update config.json --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index 17a3c58..2e87b5f 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,6 @@ { "name": "HiSense Air Conditioners", - "version": "0.3.30", + "version": "0.3.31", "slug": "hisense_ac", "description": "Interface for controlling Air Conditioners, e.g. with HiSense modules.", "url": "https://github.com/sarbuk/AirCon", From e7c067ea59877a3756dd8d1cb3f0d0e3ba738971 Mon Sep 17 00:00:00 2001 From: sarbuk <114622189+sarbuk@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:44:16 +0100 Subject: [PATCH 27/27] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f919b8e..a95d615 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ All notable changes to this project will be documented in this file. Dates are displayed in UTC. -#### [0.3.30](https://github.com/sarbuk/AirCon/compare/0.3.29...0.3.30) -> 26 June 2025 +#### [0.3.31](https://github.com/sarbuk/AirCon/compare/0.3.29...0.3.31) +> 27 June 2025 - added additional definitions in ```__main__.py``` to expose additional topics for the following, outside of the HA climate control: - economy_mode [switch]