-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Added support for cover in tellstick #10858
Conversation
Thanks for your contribution. You removed the pr template, but you should fill it out. From the checklist you are missing to add tellstick.py to .coveragerc and to update the documentation |
|
||
def _parse_tellcore_data(self, tellcore_data): | ||
"""Turn the value received from tellcore into something useful.""" | ||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use pass
instead
Support for Tellstick switches. | ||
|
||
For more details about this platform, please refer to the documentation at | ||
https://home-assistant.io/components/switch.tellstick/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switch -> cover
|
||
def _parse_ha_data(self, kwargs): | ||
"""Turn the value from HA into something useful.""" | ||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use pass
instead
tellstick.py already exisit in .coveragerc |
You are right. So I do not know why coveralls is red |
Coveralls can be ignored for now. See Paulus's comment here |
DATA_TELLSTICK, TellstickDevice) | ||
|
||
|
||
# pylint: disable=unused-argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this. It's globally disabled.
|
||
# pylint: disable=unused-argument | ||
def setup_platform(hass, config, add_devices, discovery_info=None): | ||
"""Set up the Tellstick lights.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cover.
|
||
|
||
class TellstickCover(TellstickDevice, CoverDevice): | ||
"""Representation of a Tellstick switch.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cover.
|
||
def _update_model(self, new_state, data): | ||
"""Update the device entity state to match the arguments.""" | ||
self._state = new_state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do this? You haven't implemented the is_closed
property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no feedback from Tellstick so I'ts not possible to know if the cover is up, half way or down. I just made it possible to add it as a cover to get the up, down, and stop button.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, so then you don't need this line, right? If you're required to implement this method just pass
here.
Can you test this? |
@pvizeli Tested and works as expected |
…ent-being-nonexistent * origin/dev: Volvo on call: Optional use of Scandinavian miles. Also add average fuel consumption property (home-assistant#11051) add custom bypass status to total connect (home-assistant#11042) Refactor hue to split bridge support from light platform (home-assistant#10691) Add GPS coords to meraki (home-assistant#10998) Add a caldav calendar component (home-assistant#10842) Added support for cover in tellstick (home-assistant#10858)
…into dev * 'dev' of https://github.com/home-assistant/home-assistant: Volvo on call: Optional use of Scandinavian miles. Also add average fuel consumption property (home-assistant#11051) add custom bypass status to total connect (home-assistant#11042) Refactor hue to split bridge support from light platform (home-assistant#10691) Add GPS coords to meraki (home-assistant#10998) Add a caldav calendar component (home-assistant#10842) Added support for cover in tellstick (home-assistant#10858)
Description:
New cover component for tellstick and fix for the main tellstick component to select the cover if it's not a switch or a light.
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#4096
Example entry for
configuration.yaml
(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass