Update voluputous (#12463)
* Update voluputous * Fix http config * Fix optional with default=None * Optional, default=none * Fix defaults in voluptuous schemas * Fix tests * Fix update error * Lint
This commit is contained in:
1 parent
e4ef6b91d6
commit
3fd61d8f45
88 files changed
+207
-255
No files matched your search
@@ -33,7 +33,7 @@ DEFAULT_BINARY = 'ssocr'
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Optional(CONF_EXTRA_ARGUMENTS, default=''): cv.string,
|
||||
vol.Optional(CONF_DIGITS, default=-1): cv.positive_int,
|
||||
vol.Optional(CONF_DIGITS): cv.positive_int,
|
||||
vol.Optional(CONF_HEIGHT, default=0): cv.positive_int,
|
||||
vol.Optional(CONF_SSOCR_BIN, default=DEFAULT_BINARY): cv.string,
|
||||
vol.Optional(CONF_THRESHOLD, default=0): cv.positive_int,
|
||||
@@ -73,7 +73,7 @@ class ImageProcessingSsocr(ImageProcessingEntity):
|
||||
self.filepath = os.path.join(self.hass.config.config_dir, 'ocr.png')
|
||||
crop = ['crop', str(config[CONF_X_POS]), str(config[CONF_Y_POS]),
|
||||
str(config[CONF_WIDTH]), str(config[CONF_HEIGHT])]
|
||||
digits = ['-d', str(config[CONF_DIGITS])]
|
||||
digits = ['-d', str(config.get(CONF_DIGITS, -1))]
|
||||
rotate = ['rotate', str(config[CONF_ROTATE])]
|
||||
threshold = ['-t', str(config[CONF_THRESHOLD])]
|
||||
extra_arguments = config[CONF_EXTRA_ARGUMENTS].split(' ')
|
||||
|
||||
Reference in new issue
Block a user