Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cover & changelog #78

Merged
merged 4 commits into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support for Gate devices
- Added support for AirSensor devices
- Added support for ElectricitySensor devices
- Added support for TemperatureSensor devices
- Added support for Curtain devices
- Added support for Generic devices (cover)
- Added support for SwingingShutter devices
- Added support for 'up' and 'down' commands for covers
- Added tilt_position support for covers
- Added support for 'setRGB' commands for lights

### Changed

- Removed all hardcoded device strings from the cover component
- Update state after a command has been succesfully executed

## [1.0.0] - 04-06-2020

Expand Down
3 changes: 1 addition & 2 deletions custom_components/tahoma/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
from homeassistant import config_entries, core, exceptions
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME

from .const import DOMAIN # pylint:disable=unused-import
from .const import DOMAIN
from .tahoma_api import TahomaApi

_LOGGER = logging.getLogger(__name__)

# TODO adjust the data schema to the data that you need
DATA_SCHEMA = vol.Schema(
{vol.Required(CONF_USERNAME): str, vol.Required(CONF_PASSWORD): str}
)
Expand Down
12 changes: 8 additions & 4 deletions custom_components/tahoma/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,12 @@ def stop_cover(self, **kwargs):
if "stop" in self.tahoma_device.command_definitions:
return self.apply_action("stop")

if "my" in self.tahoma_device.command_definitions:
return self.apply_action("my")

if "stopIdentify" in self.tahoma_device.command_definitions:
return self.apply_action("stopIdentify")

if "my" in self.tahoma_device.command_definitions:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure 'my' is lower priority?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% to be honest. However according to the original component, my is used less frequently. I can withdraw this 'fix' from this PR if you want.

return self.apply_action("my")

def stop_cover_tilt(self, **kwargs):
"""Stop the cover."""

Expand All @@ -345,7 +345,11 @@ def supported_features(self):
if "openSlats" in self.tahoma_device.command_definitions:
supported_features |= SUPPORT_OPEN_TILT

if "stop" in self.tahoma_device.command_definitions:
if (
"stop" in self.tahoma_device.command_definitions
or "stopIdentify" in self.tahoma_device.command_definitions
or "my" in self.tahoma_device.command_definitions
):
supported_features |= SUPPORT_STOP_TILT

if "closeSlats" in self.tahoma_device.command_definitions:
Expand Down