mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 23:06:58 +00:00
Add port
This commit is contained in:
parent
fc942a9b5e
commit
0f665e4886
@ -57,15 +57,14 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
|
||||
### {% linkable_title Port %}
|
||||
|
||||
As all port numbers are coming out of the range 1 till 65535 a range check should be performed.
|
||||
As all port numbers are coming out of the range 1 till 65535.
|
||||
|
||||
```python
|
||||
DEFAULT_PORT = 993
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
...
|
||||
vol.Optional(CONF_PORT, default=DEFAULT_PORT):
|
||||
vol.All(vol.Coerce(int), vol.Range(min=1, max=65535)),
|
||||
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
|
||||
```
|
||||
|
||||
### {% linkable_title Sensor types %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user