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
Add support for Somfy Camera Shutter #29057
Conversation
return [ | ||
SomfyCameraShutter(device, hass.data[DOMAIN][API]) | ||
for device in devices | ||
if categories & set(device.categories) |
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.
if categories & set(device.categories) | |
if Category.CAMERA.value in device.categories |
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.
Looks good! One minor tweak and it's ok to merge 🎉 🐬
6affc9c
to
739c928
Compare
@balloob Great! I've applied your modification. It should be OK now. |
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.
Thanks, @tetienne! 👍
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.
Please address the comments in a new PR. Thanks!
from pymfy.api.devices.camera_protect import CameraProtect | ||
from pymfy.api.devices.category import Category | ||
|
||
from homeassistant.components.somfy import DOMAIN, SomfyEntity, DEVICES, API |
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.
Intra package imports should be relative.
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.
I will.
from . import DOMAIN, SomfyEntity, DEVICES, API
@MartinHjelmare PR created: #29182 |
Breaking Change: N/A
Description: Add support for the Somfy Camera Shutter
See https://developer.somfy.com/products/cameras
Exemple of Somfy API answer with a camera: https://github.com/tetienne/somfy-open-api/blob/master/tests/camera.json
**Pull request with documentation for home-assistant.io (if applicable): N/A
Example entry for
configuration.yaml
(if applicable):N/A
Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed: N/A
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest
.requirements_all.txt
by runningpython3 -m script.gen_requirements_all
..coveragerc
.If the code does not interact with devices: N/A