Skip to content

Commit

Permalink
climate: remove aux_heat support. BREAKING CHANGE
Browse files Browse the repository at this point in the history
- already deprecated, alternative entities exist
- only 3 devices using it (ITS 45HD, Sendo and Vivax heatpumps)
- HA is properly deprecating it in 2024.4, so log messages encouraging
  users to report bugs will start appearing.

Issue #1784
  • Loading branch information
make-all committed Mar 29, 2024
1 parent e63802e commit a1c93e4
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 33 deletions.
22 changes: 0 additions & 22 deletions custom_components/tuya_local/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
HVACMode,
)
from homeassistant.components.climate.const import (
ATTR_AUX_HEAT,
ATTR_CURRENT_HUMIDITY,
ATTR_CURRENT_TEMPERATURE,
ATTR_FAN_MODE,
Expand Down Expand Up @@ -75,7 +74,6 @@ def __init__(self, device: TuyaLocalDevice, config: TuyaEntityConfig):
super().__init__()
dps_map = self._init_begin(device, config)

self._aux_heat_dps = dps_map.pop(ATTR_AUX_HEAT, None)
self._current_temperature_dps = dps_map.pop(
ATTR_CURRENT_TEMPERATURE,
None,
Expand All @@ -102,8 +100,6 @@ def __init__(self, device: TuyaLocalDevice, config: TuyaEntityConfig):
# checking whether we are falling back on the auto-generation.
self._enable_turn_on_off_backwards_compatibility = False

if self._aux_heat_dps:
self._attr_supported_features |= ClimateEntityFeature.AUX_HEAT
if self._fan_mode_dps:
self._attr_supported_features |= ClimateEntityFeature.FAN_MODE
if self._humidity_dps:
Expand Down Expand Up @@ -380,24 +376,6 @@ async def async_turn_off(self):
else:
await super().async_turn_off()

@property
def is_aux_heat(self):
"""Return state of aux heater"""
if self._aux_heat_dps:
return self._aux_heat_dps.get_value(self._device)

async def async_turn_aux_heat_on(self):
"""Turn on aux heater."""
if self._aux_heat_dps is None:
raise NotImplementedError()
await self._aux_heat_dps.async_set_value(self._device, True)

async def async_turn_aux_heat_off(self):
"""Turn off aux heater."""
if self._aux_heat_dps is None:
raise NotImplementedError()
await self._aux_heat_dps.async_set_value(self._device, False)

@property
def preset_mode(self):
"""Return the current preset mode."""
Expand Down
1 change: 0 additions & 1 deletion custom_components/tuya_local/devices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ from the camera.
**NOTE**: tuya-local does not directly support video streaming from cameras. Some cameras provide ONVIF or WebRTC compliant streams locally which you can use the relevant integrations to capture, others may be cloud-only.

### `climate`
- **aux_heat** (optional, boolean, DEPRECATED) a dp to control the aux heat switch if the device has one. Note this is being deprecated by HA and no longer accessible from the UI since HA 2023.9, though the deprecation announcement is yet to be made as of 2023.11. It is recommended not to use this, and instead use an separate switch entity.
- **current_temperature** (optional, number) a dp that reports the current temperature.
- **current_humidity** (optional, number) a dp that reports the current humidity (%).
- **fan_mode** (optional, mapping of strings) a dp to control the fan mode if available.
Expand Down
3 changes: 0 additions & 3 deletions custom_components/tuya_local/devices/its_45hd_heatpump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ primary_entity:
- id: 30
type: boolean
name: chlorination
- id: 32
type: boolean
name: aux_heat
- id: 40
type: integer
name: model_code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ primary_entity:
value: eco
- dps_val: false
value: comfort
- id: 12
name: aux_heat
type: boolean
- id: 33
name: swing_mode
type: boolean
Expand Down
3 changes: 0 additions & 3 deletions custom_components/tuya_local/devices/vivax_heatpump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ primary_entity:
value: eco
- dps_val: false
value: comfort
- id: 12
type: boolean
name: aux_heat
- id: 18
type: integer
name: current_humidity
Expand Down
1 change: 0 additions & 1 deletion tests/test_device_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@
"climate": {
"required": [],
"optional": [
"aux_heat",
"current_temperature",
"current_humidity",
"fan_mode",
Expand Down

0 comments on commit a1c93e4

Please sign in to comment.