Namespaces | |
| const | |
Classes | |
| class | ImageServeView |
| class | ImageStorageCollection |
| class | ImageUploadStorageCollectionWebsocket |
| class | ImageUploadView |
Functions | |
| None | _generate_thumbnail_if_file_does_not_exist (pathlib.Path target_file, pathlib.Path original_path, str content_type, pathlib.Path target_path, tuple[int, int] target_size) |
| tuple[int, int] | _validate_size_from_filename (str filename) |
| bool | async_setup (HomeAssistant hass, ConfigType config) |
Variables | |
| _LOGGER = logging.getLogger(__name__) | |
| CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN) | |
| int | MAX_SIZE = 1024 * 1024 * 10 |
| string | STORAGE_KEY = "image" |
| int | STORAGE_VERSION = 1 |
| dictionary | VALID_SIZES = {256, 512} |
| VolDictType | |
The Image Upload integration.
|
private |
Generate a size.
Definition at line 242 of file __init__.py.
|
private |
Parse image size from the given filename (of the form WIDTHxHEIGHT-filename).
>>> _validate_size_from_filename("100x100-image.png")
(100, 100)
>>> _validate_size_from_filename("jeff.png")
Traceback (most recent call last):
...
Definition at line 256 of file __init__.py.
| bool homeassistant.components.image_upload.async_setup | ( | HomeAssistant | hass, |
| ConfigType | config | ||
| ) |
Set up the Image integration.
Definition at line 46 of file __init__.py.
|
private |
Definition at line 29 of file __init__.py.
| homeassistant.components.image_upload.CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN) |
Definition at line 43 of file __init__.py.
| int homeassistant.components.image_upload.MAX_SIZE = 1024 * 1024 * 10 |
Definition at line 33 of file __init__.py.
| string homeassistant.components.image_upload.STORAGE_KEY = "image" |
Definition at line 30 of file __init__.py.
| int homeassistant.components.image_upload.STORAGE_VERSION = 1 |
Definition at line 31 of file __init__.py.
| dictionary homeassistant.components.image_upload.VALID_SIZES = {256, 512} |
Definition at line 32 of file __init__.py.
| homeassistant.components.image_upload.VolDictType |
Definition at line 35 of file __init__.py.