Samsung Family hub camera component#14458
Conversation
|
|
||
|
|
||
|
|
||
| class FamilyHubCamera(Camera): |
| vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string, | ||
| }) | ||
|
|
||
| async def async_setup_platform(hass, config, async_add_devices, discovery_info=None): |
There was a problem hiding this comment.
expected 2 blank lines, found 1
line too long (85 > 79 characters)
|
|
||
| REQUIREMENTS = ['pyfamilyhublocal==0.0.2'] | ||
|
|
||
| CONF_IP = 'address' |
There was a problem hiding this comment.
We have CONF_IP_ADDRESS in const.py. Please use that.
There was a problem hiding this comment.
Got it, and i'm updating the docs now
|
I ran the Edit: Just figured out what I did wrong, fixing it now... |
This reverts commit 3a38681.
|
Okay fixed the library name and reverted my bad commit that changed a bunch of versions in the Hopefully all checks pass this time! |
| @property | ||
| def should_poll(self): | ||
| """Camera should poll periodically.""" | ||
| return True |
There was a problem hiding this comment.
Why should this camera poll? The frontend drives the camera updates.
There was a problem hiding this comment.
It seems I misunderstood what this does, I can fix it along with the method name later tonight and resubmit the PR.
There was a problem hiding this comment.
Great! Please open a new PR based on fresh dev, as this PR is merged.
| self._name = name | ||
| self.family_hub_cam = family_hub_cam | ||
|
|
||
| async def camera_image(self): |
There was a problem hiding this comment.
This should be async_camera_image.
* add familyhub.py camera * fix import and REQUIREMENTS * add to coveragerc * fix formatting to make houndci-bot happy * ran scripts/gen_requirements_all.py * use CONF_IP_ADDRESS * Revert "ran scripts/gen_requirements_all.py" This reverts commit 3a38681. * fix library name * add missing docstrings and enable polling * Sort imports
Description:
Family Hub camera for Samsung Refrigerators.
Related issue (if applicable):
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5364
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices: