mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 01:06:52 +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 %}
|
### {% 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
|
```python
|
||||||
DEFAULT_PORT = 993
|
DEFAULT_PORT = 993
|
||||||
|
|
||||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
...
|
...
|
||||||
vol.Optional(CONF_PORT, default=DEFAULT_PORT):
|
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
|
||||||
vol.All(vol.Coerce(int), vol.Range(min=1, max=65535)),
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### {% linkable_title Sensor types %}
|
### {% linkable_title Sensor types %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user