DoorBird#8871
Conversation
|
@Klikini, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @fabaff and @happyleavesaoc to be potential reviewers. |
fabaff
left a comment
There was a problem hiding this comment.
Please remove the commit for homeassistant/components/frontend/www_static/home-assistant-polymer.
| } | ||
|
|
||
| PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ | ||
| vol.Required(CONF_MONITORED_CONDITIONS, default=[]): |
There was a problem hiding this comment.
If only doorbell is available then this should be the default and the configuration by the user omitted. According to the DoorBird docs there is an additional connector available. That one could be the second type.
There was a problem hiding this comment.
I saw that in the docs, but when I query my device, it will only return the doorbell status. I assume the docs are outdated. I'll just make it the default here.
| return False | ||
| else: | ||
| _LOGGER.error("Could not connect to DoorBird at %s as %s: Error %s", | ||
| ip, username, str(status[1])) |
There was a problem hiding this comment.
I would like to suggest to not send the username to the log file as for sharing the log file it would require to be sanitized and the chances are high that it won't happen.
|
|
||
| if status[0]: | ||
| _LOGGER.info("Connected to DoorBird at %s as %s", ip, username) | ||
| hass.data[DOMAIN] = device |
There was a problem hiding this comment.
Please use hass.data[DATA_YOUR_DOMAIN] instead hass.data[DOMAIN].
There was a problem hiding this comment.
I'm not sure what this means. Do I define a new constant called DATA_DOORBIRD and use that here? But what would its value be? I'm using the Ring component as an example, and this is what is used there.
| } | ||
|
|
||
| PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ | ||
| vol.Required(CONF_SWITCHES, default=[]): |
There was a problem hiding this comment.
Why not make switches optional with open_door as default? This seems to be one of the core features of DoorBird. Or is this just one of the two built-in relays?
There was a problem hiding this comment.
If one was to be the default, I'd say light_on would be a better choice. It turns on the IR array for night vision, which all DoorBird devices include. The open_door switch is only useful if you have an electronic door strike installed.
| from homeassistant.components.doorbird import DOMAIN | ||
| import homeassistant.helpers.config_validation as cv | ||
| from homeassistant.const import CONF_MONITORED_CONDITIONS, STATE_UNKNOWN | ||
| from homeassistant.util import Throttle |
| """A binary sensor of a DoorBird device.""" | ||
| def __init__(self, device, sensor_type): | ||
| """Initialize a binary sensor on a DoorBird device.""" | ||
| if sensor_type not in SENSOR_TYPES: |
There was a problem hiding this comment.
Already covered by the configuration validation.
|
|
||
| def setup_platform(hass, config, add_devices, discovery_info=None): | ||
| """Set up the DoorBird binary sensor component.""" | ||
| device = hass.data.get(DOMAIN) |
There was a problem hiding this comment.
See comment on the component about this.
|
|
||
| @property | ||
| def name(self): | ||
| """:returns: The name of the sensor.""" |
| def icon(self): | ||
| """:returns: An icon to display.""" | ||
| icon = SENSOR_TYPES[self._sensor_type]["icon"][self._state] | ||
| return "mdi:" + str(icon) |
| CONF_SHOW_LAST_VISITOR = 'last_visitor' | ||
|
|
||
| PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ | ||
| vol.Required(CONF_SHOW_LAST_VISITOR, default=False): cv.boolean |
There was a problem hiding this comment.
Should be vol.Optional if you want to set a default. Is "optional" according to your docs.
|
|
||
| from homeassistant.components.binary_sensor import BinarySensorDevice | ||
| from homeassistant.components.doorbird import DOMAIN | ||
| from homeassistant.const import STATE_UNKNOWN |
|
We do you not use our |
|
DoorBird is a doorbell, not a door lock.
…On Aug 18, 2017 8:44 AM, "Pascal Vizeli" ***@***.***> wrote:
We do you not use our lock component?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8871 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABnZCIibtmuogVzRoFbN3lbCcf_jTmCHks5sZZU4gaJpZM4Ouzd1>
.
|
|
Andy, What's holding up merge of your pull request? |
|
You need cleanup your PR and remove changes on |
|
@pvizeli I'm not sure how to fix the submodule issue. I didn't make any changes to it, so I'm not sure why it always gets pushed. I tried checking out As for cleaning up the RachioPy commits, I said I had tried and failed to do that. Am I missing something in the docs, or does Git just hate me lately? |
|
Make a new PR and copy you files into this new PR. That is the fast way to fix that. |
Description:
Adds components for the DoorBird video doorbell.
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#3147
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:
toxrun successfully. Your PR cannot be merged unless tests passREQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.About the older commits: I have tried everything and cannot seem to get rid of them. Help is welcome.