Validate ports as a port (#17549)
* Validate ports as port Better than just a positive integer since it limits the range from 1 to 65535. * Validate port for Axis * Validate port for Xiaomi Home Camera * Validate port for Modbus * Validate port for Yamaha MusicCast Receivers * Update zhong_hong.py Validate port as a port, the gateway address as positive_int Also moved the default values to their variable * Validate port for the Asterisk Voicemail interface * Fix lint * Validate port for Xiaomi Cameras
This commit is contained in:
parent
50a66abd80
commit
b50c93ccb7
8 changed files with 18 additions and 15 deletions
|
@ -32,7 +32,7 @@ CONF_FFMPEG_ARGUMENTS = 'ffmpeg_arguments'
|
|||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Required(CONF_NAME): cv.string,
|
||||
vol.Required(CONF_HOST): cv.string,
|
||||
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.string,
|
||||
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
|
||||
vol.Optional(CONF_PATH, default=DEFAULT_PATH): cv.string,
|
||||
vol.Optional(CONF_USERNAME, default=DEFAULT_USERNAME): cv.string,
|
||||
vol.Required(CONF_PASSWORD): cv.string,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue