mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Rename ocr.png to ssocr-(entity_name).png to allow multiple instances (#18634)
* * Rename ocr.png to ssocr-(entity_name).png to allow multiple seven_segments instances to run without overwrting each other's data. * Update seven_segments.py * Update seven_segments.py * Use string formatting
This commit is contained in:
parent
d42d8543c8
commit
dcf925a67f
@ -69,7 +69,9 @@ class ImageProcessingSsocr(ImageProcessingEntity):
|
||||
split_entity_id(camera_entity)[1])
|
||||
self._state = None
|
||||
|
||||
self.filepath = os.path.join(self.hass.config.config_dir, 'ocr.png')
|
||||
self.filepath = os.path.join(self.hass.config.config_dir,
|
||||
'ssocr-{0}.png'.format(
|
||||
self._name.replace(' ', '_')))
|
||||
crop = ['crop', str(config[CONF_X_POS]), str(config[CONF_Y_POS]),
|
||||
str(config[CONF_WIDTH]), str(config[CONF_HEIGHT])]
|
||||
digits = ['-d', str(config.get(CONF_DIGITS, -1))]
|
||||
|
Loading…
x
Reference in New Issue
Block a user