Skip to content

Commit

Permalink
Merge pull request #32 from mikelawrence/dev
Browse files Browse the repository at this point in the history
Allow fan to resume last speed when turned on
  • Loading branch information
mikelawrence authored Mar 10, 2021
2 parents 1e590c7 + 7b1a646 commit e48a2f7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for Home Assistant integration for SenseME fans

## 2.2.4 - Allow fan to resume last speed when turned on

* Previous versions set the fan percentage to 25% (speed 2) when just turned on. Now when the fan is turned on and percentage is not specified the fan will resume last set speed.

## 2.2.3 - Bump aiosenseme library to >= v0.5.4

* This improves detection logic for lost connections to devices.
Expand Down
5 changes: 3 additions & 2 deletions custom_components/senseme/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def supported_features(self) -> int:
@property
def speed_count(self) -> int:
"""Return the number of speeds."""
return self._device.fan_speed_limits[1]
return self._device.fan_speed_max

@property
def percentage(self) -> str:
Expand Down Expand Up @@ -114,7 +114,8 @@ async def async_turn_on(
self._device.sleep_mode = True
return
if percentage is None:
percentage = 25
self._device.fan_on = True
return
await self.async_set_percentage(percentage)

async def async_turn_off(self, **kwargs: Any) -> None:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/senseme/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "senseme",
"name": "SenseME",
"version": "2.2.3",
"version": "2.2.4",
"config_flow": true,
"documentation": "https://www.github.com/mikelawrence/senseme-hacs",
"issue_tracker": "https://github.com/mikelawrence/senseme-hacs/issues",
Expand Down
2 changes: 1 addition & 1 deletion custom_components/senseme/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version for senseme-hacs."""

__version__ = "2.2.3"
__version__ = "2.2.4"

0 comments on commit e48a2f7

Please sign in to comment.