Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #14 from Devotics/feature/home-assistant-0.110-dep…
Browse files Browse the repository at this point in the history
…recation-notices

🐛 Fix `ClimateDevice` deprecation notices
  • Loading branch information
Dramloc authored Jun 8, 2020
2 parents 67e37d4 + ae5a403 commit 3e12c9c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ You can find installation instructions for specific Home Assistant versions belo

| Home Assistant version | Heatzy component version |
| ----------------------- | --------------------------------------------------------- |
| 0.96 and higher | [master](#installation-for-home-assistant-096-and-higher) |
| 0.110 and higher | [master](#installation-for-home-assistant-0110-and-higher) |
| 0.96 to 0.109 | [3.1.0](#installation-for-home-assistant-096-to-0109) |
| 0.89 to 0.95 | [2.0.1](#installation-for-home-assistant-089-to-095) |
| 0.88 and lower | [1.1.1](#installation-for-home-assistant-088-and-lower) |

### Installation for Home Assistant 0.96 and higher
### Installation for Home Assistant 0.110 and higher

The following commands assume that your Home Assistant folder is located in `~/.homeassistant/custom_components`:

Expand All @@ -31,6 +32,23 @@ cp -rl Devotics-heatzy-home-hassistant-*/heatzy .
rm -rf Devotics-heatzy-home-hassistant-*
```

### Installation for Home Assistant 0.96 to 0.109

Version 4.0.0 of this component removes some deprecation notices introduced by [this pull request](https://github.com/home-assistant/core/pull/34591). You can still install a compatible version for Home Assistant versions 0.96 to 0.109 with the following instructions:

```bash
# Create custom_components folder
mkdir -p ~/.homeassistant/custom_components
# Move to the custom_components folder
cd ~/.homeassistant/custom_components
# Fetch this repo and extract it
curl -L https://api.github.com/repos/Devotics/heatzy-home-hassistant/tarball/3.1.0 | tar -xz
# Copy heatzy folder
cp -rl Devotics-heatzy-home-hassistant-*/heatzy .
# Clean up
rm -rf Devotics-heatzy-home-hassistant-*
```

### Installation for Home Assistant 0.89 to 0.95

Version 3.0.0 of this component introduces breaking changes related to [the Climate Cleanup](https://developers.home-assistant.io/blog/2019/07/03/climate-cleanup.html). You can still install a compatible version for Home Assistant versions 0.89 to 0.95 with the following instructions:
Expand Down
4 changes: 2 additions & 2 deletions heatzy/pilote_v1.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from homeassistant.components.climate import ClimateDevice
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (HVAC_MODE_AUTO,
PRESET_AWAY,
PRESET_COMFORT, PRESET_ECO,
Expand All @@ -21,7 +21,7 @@
}


class HeatzyPiloteV1Thermostat(ClimateDevice):
class HeatzyPiloteV1Thermostat(ClimateEntity):
def __init__(self, api, device):
self._api = api
self._device = device
Expand Down
4 changes: 2 additions & 2 deletions heatzy/pilote_v2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from homeassistant.components.climate import ClimateDevice
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (HVAC_MODE_AUTO,
PRESET_AWAY,
PRESET_COMFORT, PRESET_ECO,
Expand All @@ -21,7 +21,7 @@
}


class HeatzyPiloteV2Thermostat(ClimateDevice):
class HeatzyPiloteV2Thermostat(ClimateEntity):
def __init__(self, api, device):
self._api = api
self._device = device
Expand Down

0 comments on commit 3e12c9c

Please sign in to comment.