Python homeassistant.helpers.config_validation.positive_int() Examples
The following are 4
code examples of homeassistant.helpers.config_validation.positive_int().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
homeassistant.helpers.config_validation
, or try the search function
.
Example #1
Source File: create_schema.py From visonic with Apache License 2.0 | 5 votes |
def create_parameters2cv(options): # Panel settings - can be modified/edited return { vol.Optional(CONF_MOTION_OFF_DELAY, default=create_default(options, CONF_MOTION_OFF_DELAY, 120) ) : cv.positive_int, vol.Optional(CONF_SIREN_SOUNDING, default=create_default(options, CONF_SIREN_SOUNDING,["intruder"])) : cv.multi_select(available_siren_values), vol.Optional(CONF_OVERRIDE_CODE, default=create_default(options, CONF_OVERRIDE_CODE, "") ) : cv.string, vol.Optional(CONF_ARM_CODE_AUTO, default=create_default(options, CONF_ARM_CODE_AUTO, False)) : cv.boolean, vol.Optional(CONF_FORCE_KEYPAD, default=create_default(options, CONF_FORCE_KEYPAD, False)) : cv.boolean, vol.Optional(CONF_INSTANT_ARM_AWAY, default=create_default(options, CONF_INSTANT_ARM_AWAY, False)) : cv.boolean, vol.Optional(CONF_INSTANT_ARM_HOME, default=create_default(options, CONF_INSTANT_ARM_HOME, False)) : cv.boolean, vol.Optional(CONF_ENABLE_REMOTE_ARM, default=create_default(options, CONF_ENABLE_REMOTE_ARM, False)) : cv.boolean, vol.Optional(CONF_ENABLE_REMOTE_DISARM, default=create_default(options, CONF_ENABLE_REMOTE_DISARM, False)) : cv.boolean, vol.Optional(CONF_ENABLE_SENSOR_BYPASS, default=create_default(options, CONF_ENABLE_SENSOR_BYPASS, False)) : cv.boolean }
Example #2
Source File: create_schema.py From visonic with Apache License 2.0 | 5 votes |
def create_parameters3cv(options): # Log file parameters return { vol.Optional(CONF_LOG_EVENT, default=create_default(options, CONF_LOG_EVENT, False)) : cv.boolean, vol.Optional(CONF_LOG_DONE, default=create_default(options, CONF_LOG_DONE, False)) : cv.boolean, vol.Optional(CONF_LOG_REVERSE, default=create_default(options, CONF_LOG_REVERSE, False)) : cv.boolean, vol.Optional(CONF_LOG_CSV_TITLE, default=create_default(options, CONF_LOG_CSV_TITLE, False)) : cv.boolean, vol.Optional(CONF_LOG_XML_FN, default=create_default(options, CONF_LOG_XML_FN, "")) : cv.string, vol.Optional(CONF_LOG_CSV_FN, default=create_default(options, CONF_LOG_CSV_FN, "")) : cv.string, vol.Optional(CONF_LOG_MAX_ENTRIES, default=create_default(options, CONF_LOG_MAX_ENTRIES, 10000)) : cv.positive_int }
Example #3
Source File: create_schema.py From visonic with Apache License 2.0 | 5 votes |
def create_parameters4cv(options): # B0 related parameters (PowerMaster only) return { vol.Optional(CONF_B0_ENABLE_MOTION_PROCESSING, default=create_default(options, CONF_B0_ENABLE_MOTION_PROCESSING, False)) : cv.boolean, vol.Optional(CONF_B0_MAX_TIME_FOR_TRIGGER_EVENT, default=create_default(options, CONF_B0_MAX_TIME_FOR_TRIGGER_EVENT, 5)) : cv.positive_int, vol.Optional(CONF_B0_MIN_TIME_BETWEEN_TRIGGERS, default=create_default(options, CONF_B0_MIN_TIME_BETWEEN_TRIGGERS, 30)) : cv.positive_int }
Example #4
Source File: config_flow.py From SmartHouse with MIT License | 3 votes |
def __init__(self): """Initialize the config flow.""" self.login = None self.config = OrderedDict() self.data_schema = OrderedDict( [ (vol.Required(CONF_EMAIL), str), (vol.Required(CONF_PASSWORD), str), (vol.Required(CONF_URL, default="amazon.com"), str), (vol.Optional(CONF_DEBUG, default=False), bool), (vol.Optional(CONF_INCLUDE_DEVICES, default=""), str), (vol.Optional(CONF_EXCLUDE_DEVICES, default=""), str), (vol.Optional(CONF_SCAN_INTERVAL, default=60), int), ] ) self.captcha_schema = OrderedDict( [(vol.Required(CONF_PASSWORD), str), (vol.Required("captcha"), str)] ) self.twofactor_schema = OrderedDict([(vol.Required("securitycode"), str)]) self.claimspicker_schema = OrderedDict( [ ( vol.Required("claimsoption", default=0), vol.All(cv.positive_int, vol.Clamp(min=0)), ) ] ) self.authselect_schema = OrderedDict( [ ( vol.Required("authselectoption", default=0), vol.All(cv.positive_int, vol.Clamp(min=0)), ) ] ) self.verificationcode_schema = OrderedDict( [(vol.Required("verificationcode"), str)] )