From 067752005db380d06a2d6498fe502aba7674c948 Mon Sep 17 00:00:00 2001 From: ArtMG Date: Fri, 23 Jun 2023 10:57:14 +0100 Subject: [PATCH 1/4] minor doc link for installation types --- docs/install-in-HACS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/install-in-HACS.md b/docs/install-in-HACS.md index 8e8fdde..38559d5 100644 --- a/docs/install-in-HACS.md +++ b/docs/install-in-HACS.md @@ -4,6 +4,7 @@ This assumes you have already installed the Home Assistant Community Store follo https://hacs.xyz/docs/setup/prerequisites +If you want other kinds if installation, please see [README](../README.md). ## Default installation From 38ef7aef4168ef1b07b42a7465b4c6c74e7f8228 Mon Sep 17 00:00:00 2001 From: Rob Chandhok Date: Fri, 12 Jan 2024 12:45:48 -0800 Subject: [PATCH 2/4] Updated to use new ENUM constants instead of deprecated ones. Triggered by 2023.12 release deprecation notes on startup. --- custom_components/warmup/climate.py | 51 +++++++++++++---------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/custom_components/warmup/climate.py b/custom_components/warmup/climate.py index 7dbde49..ac049ca 100644 --- a/custom_components/warmup/climate.py +++ b/custom_components/warmup/climate.py @@ -8,17 +8,12 @@ from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateEntity from homeassistant.components.climate.const import ( - CURRENT_HVAC_HEAT, - CURRENT_HVAC_IDLE, - CURRENT_HVAC_OFF, - HVAC_MODE_AUTO, - HVAC_MODE_HEAT, - HVAC_MODE_OFF, + HVACAction, + HVACMode, PRESET_AWAY, PRESET_BOOST, PRESET_HOME, - SUPPORT_PRESET_MODE, - SUPPORT_TARGET_TEMPERATURE, + ClimateEntityFeature, ) from homeassistant.const import ( ATTR_ENTITY_ID, @@ -26,7 +21,7 @@ CONF_PASSWORD, CONF_USERNAME, PRECISION_HALVES, - TEMP_CELSIUS, + UnitOfTemperature, ) from homeassistant.exceptions import InvalidStateError, PlatformNotReady import homeassistant.helpers.config_validation as cv @@ -65,15 +60,15 @@ CONST_MODE_OFF = "off" # Switch off heating in a zone HVAC_MAP_WARMUP_HEAT = { - CONST_MODE_PROGRAM: HVAC_MODE_AUTO, - CONST_MODE_FIXED: HVAC_MODE_HEAT, - CONST_MODE_AWAY: HVAC_MODE_AUTO, - CONST_MODE_FROST: HVAC_MODE_HEAT, - CONST_MODE_OFF: HVAC_MODE_OFF, + CONST_MODE_PROGRAM: HVACMode.AUTO, + CONST_MODE_FIXED: HVACMode.HEAT, + CONST_MODE_AWAY: HVACMode.AUTO, + CONST_MODE_FROST: HVACMode.HEAT, + CONST_MODE_OFF: HVACMode.OFF, } -SUPPORT_FLAGS = SUPPORT_TARGET_TEMPERATURE | SUPPORT_PRESET_MODE -SUPPORT_HVAC_HEAT = [HVAC_MODE_HEAT, HVAC_MODE_AUTO, HVAC_MODE_OFF] +SUPPORT_FLAGS = ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE +SUPPORT_HVAC_HEAT = [HVACMode.HEAT, HVACMode.AUTO, HVACMode.OFF] SUPPORT_PRESET = [PRESET_AWAY, PRESET_HOME, PRESET_BOOST] PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( @@ -176,21 +171,21 @@ def target_temperature(self): def hvac_mode(self): """Return hvac operation ie. heat, cool mode. - Need to be one of HVAC_MODE_*. + Need to be one of HVACMode. """ - return HVAC_MAP_WARMUP_HEAT.get(self._current_operation_mode, HVAC_MODE_AUTO) + return HVAC_MAP_WARMUP_HEAT.get(self._current_operation_mode, HVACMode.AUTO) @property def hvac_action(self): """Return the current running hvac operation if supported. - Need to be one of CURRENT_HVAC_*. + Need to be one of HVACAction. """ if not self._on: - return CURRENT_HVAC_OFF + return HVACAction.OFF if not self._away: - return CURRENT_HVAC_HEAT - return CURRENT_HVAC_IDLE + return HVACAction.HEATING + return HVACAction.IDLE @property def preset_mode(self): @@ -237,17 +232,17 @@ def set_hvac_mode(self, hvac_mode): Switch device on if was previously off """ - if hvac_mode == HVAC_MODE_OFF: + if hvac_mode == HVACMode.OFF: self._on = False self._device.set_location_to_off() self._current_operation_mode = CONST_MODE_OFF - elif hvac_mode == HVAC_MODE_AUTO: + elif hvac_mode == HVACMode.AUTO: self._on = True self._device.set_temperature_to_auto() self._current_operation_mode = CONST_MODE_PROGRAM - elif hvac_mode == HVAC_MODE_HEAT: + elif hvac_mode == HVACMode.HEAT: self._on = True self._device.set_temperature_to_manual() self._current_operation_mode = CONST_MODE_FIXED @@ -316,7 +311,7 @@ def state_attributes(self) -> Dict[str, Any]: def min_temp(self): """Return the minimum temperature.""" # return convert_temperature( - # self._device.min_temp, TEMP_CELSIUS, self.hass.config.units.temperature_unit + # self._device.min_temp, UnitOfTemperature.CELSIUS, self.hass.config.units.temperature_unit # ) return self._device.min_temp @@ -324,7 +319,7 @@ def min_temp(self): def max_temp(self): """Return the maximum temperature.""" # return convert_temperature( - # self._device.max_temp, TEMP_CELSIUS, self.hass.config.units.temperature_unit + # self._device.max_temp, UnitOfTemperature.CELSIUS, self.hass.config.units.temperature_unit # ) return self._device.max_temp @@ -341,7 +336,7 @@ def should_poll(self): @property def temperature_unit(self): """Return the unit of measurement.""" - return TEMP_CELSIUS + return UnitOfTemperature.CELSIUS @property def target_temperature_step(self): From d743cb63b519625cf20b6ee1f03fa00645ba62be Mon Sep 17 00:00:00 2001 From: ArtMG Date: Wed, 7 Feb 2024 12:30:06 +0000 Subject: [PATCH 3/4] more testing methods in CONTRIBUTING.md --- CONTRIBUTING.md | 67 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 51 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2bd9358..5ecb026 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,25 +2,71 @@ Thank you for your interest in helping out with this project. -Two very straighforward ways of getting involved on your own terms are: +In ascending order of complexity, here are ways you can get involved with this project: * Issues * looking at [issues raised](https://github.com/ha-warmup/warmup/issues) and trying to advise users looking for help, or encouraging them to obtain useful diagnostics * Documentation - * increasing the detail, accuracy or readability in our [documentation wiki](https://github.com/ha-warmup/warmup/wiki) + * increasing the detail, accuracy or readability in: + * our [documentation wiki](https://github.com/ha-warmup/warmup/wiki) (which you can edit directly) or + * any of the readme files accompanying the code (which will require a pull request) +* Testing + * when candidate fixes are posted against issues, you can load the modified code yourself and give it a go, to see if it works well under your own circumstances +* Coding (Development) + * modifying the programme source code or configuration defaults in order to rectify reported issues, or to work on new features -Otherwise, if you are willing to help us test new features, +## Testing + +## Beta + +If you are willing to help us test new features, before they are put on general release, you can set your HACS Integration (re-)download settings to `show beta versions`. ![download-show-beta](docs/images/download-show-beta.png) -If you want to take things further you can get involved with code, -either to deal with issues raised or to develop new features. +Please report any failure with specific messages or circumstance, in the relevant issue ticket. If you get none, then please report your success, so that we know we are closer to promoting the fix towards the main live release. + +## Alpha testing + +If you are suffering with a specific issue yourself, or are just happy to get involved in earlier testing, you can obtain earlier releases of code in different ways, depending on your setup. + +Let's suppose that someone has submitted a Pull Request (PR) for a branch called `fix232_v2`, here are a couple of methods. + +#### Alternative manual install + +If you installed your set up manually, you can use the [alternative manual install method](https://github.com/ha-warmup/warmup?tab=readme-ov-file#alternative-versions) specifying the branch, e.g. + +``` +git clone -b fix232_v2 https://github.com/ha-warmup/warmup.git /tmp/warmup +``` + +#### HACS install.service + +You can install a specific branch on HASOS / HACS by calling the update.install service + +``` +service: update.install +data: + version: fix232_v2 +target: + entity_id: update.warmup_under_floor_heating_integration_update +``` ## Development +### Project Structure + +For the time being, contributors have settled on a +[project structure](https://github.com/ha-warmup/warmup/issues/50) +that includes: + +* HACS integration as a custom repository, with associated metadata files +* Instructions for manual install as custom_component +* incorporating any changes to the API-related python code in warmup4ie subfolder + * and keeping a tracking copy in the root warmup4ie-PyPi folder for later + ### Forking As you will use a fork for your development we encourage you to @@ -54,17 +100,6 @@ to work on your local project repository. Please raise an issue if you want further guidance on developing new features or fixing issues. -### Project Structure - -For the time being, contributors have settled on a -[project structure](https://github.com/ha-warmup/warmup/issues/50) -that includes: - -* HACS integration as a custom repository, with associated metadata files -* Instructions for manual install as custom_component -* incorporating any changes to the API-related python code in warmup4ie subfolder - * and keeping a tracking copy in the root warmup4ie-PyPi folder for later - ### Pull Requests Once you have completed your development and testing on your changes, From 375a8709ffb895feb0dee04c007120f2863860df Mon Sep 17 00:00:00 2001 From: ArtMG Date: Wed, 7 Feb 2024 13:45:58 +0000 Subject: [PATCH 4/4] Changelog and manifest ready for Pre-Release 2024.2.7 --- CHANGELOG.md | 43 ++++++++++++++++++++++++-- custom_components/warmup/manifest.json | 2 +- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d673ed..85a4250 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,9 +16,36 @@ Recent features from development that have not been formally released yet: ### Added -* e66cebf Include full documention for HACS installation with images -* 01b4bb7 How to disable actions when they fail in your OWN fork -* 909513e Contributing pre-releases (beta versions) +* + +### Changed + +* + +### Fixed + +* + +### Documented + +* + +### Deprecated + +* + +### Removed + +* + + +## 2024.2.7 Pre-release + +Prepare for HA Core 2025.1 release, by moving deprecated Contants to Enums. Triggered by HA Core 2023.12 release logging deprecation warnings on startup. + +### Added + +* ### Changed @@ -26,6 +53,16 @@ Recent features from development that have not been formally released yet: ### Fixed +* 38ef7ae Updated to use new ENUM constants instead of deprecated ones (Issue #65) +* + +### Documented + +* d743cb6 more testing methods in CONTRIBUTING.md +* 0677520 minor doc link for installation types +* e66cebf Include full documention for HACS installation with images +* 01b4bb7 How to disable actions when they fail in your OWN fork +* 909513e Contributing pre-releases (beta versions) * ### Deprecated diff --git a/custom_components/warmup/manifest.json b/custom_components/warmup/manifest.json index c640159..8fadc2b 100644 --- a/custom_components/warmup/manifest.json +++ b/custom_components/warmup/manifest.json @@ -8,5 +8,5 @@ "iot_class": "cloud_polling", "issue_tracker": "https://github.com/ha-warmup/warmup/issues/", "requirements": [], - "version": "2023.3.27" + "version": "2024.2.7" }