mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix and upgrade minio integration (#84545)
closes https://github.com/home-assistant/core/issues/79842
This commit is contained in:
parent
bfdca4b274
commit
1dec6854e5
@ -136,8 +136,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
file_path = _render_service_value(service, ATTR_FILE_PATH)
|
file_path = _render_service_value(service, ATTR_FILE_PATH)
|
||||||
|
|
||||||
if not hass.config.is_allowed_path(file_path):
|
if not hass.config.is_allowed_path(file_path):
|
||||||
_LOGGER.error("Invalid file_path %s", file_path)
|
raise ValueError(f"Invalid file_path {file_path}")
|
||||||
return
|
|
||||||
|
|
||||||
minio_client.fput_object(bucket, key, file_path)
|
minio_client.fput_object(bucket, key, file_path)
|
||||||
|
|
||||||
@ -148,8 +147,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
file_path = _render_service_value(service, ATTR_FILE_PATH)
|
file_path = _render_service_value(service, ATTR_FILE_PATH)
|
||||||
|
|
||||||
if not hass.config.is_allowed_path(file_path):
|
if not hass.config.is_allowed_path(file_path):
|
||||||
_LOGGER.error("Invalid file_path %s", file_path)
|
raise ValueError(f"Invalid file_path {file_path}")
|
||||||
return
|
|
||||||
|
|
||||||
minio_client.fget_object(bucket, key, file_path)
|
minio_client.fget_object(bucket, key, file_path)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "minio",
|
"domain": "minio",
|
||||||
"name": "Minio",
|
"name": "Minio",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/minio",
|
"documentation": "https://www.home-assistant.io/integrations/minio",
|
||||||
"requirements": ["minio==5.0.10"],
|
"requirements": ["minio==7.1.12"],
|
||||||
"codeowners": ["@tkislan"],
|
"codeowners": ["@tkislan"],
|
||||||
"iot_class": "cloud_push",
|
"iot_class": "cloud_push",
|
||||||
"loggers": ["minio"]
|
"loggers": ["minio"]
|
||||||
|
@ -34,7 +34,9 @@ def create_minio_client(
|
|||||||
endpoint: str, access_key: str, secret_key: str, secure: bool
|
endpoint: str, access_key: str, secret_key: str, secure: bool
|
||||||
) -> Minio:
|
) -> Minio:
|
||||||
"""Create Minio client."""
|
"""Create Minio client."""
|
||||||
return Minio(endpoint, access_key, secret_key, secure)
|
return Minio(
|
||||||
|
endpoint=endpoint, access_key=access_key, secret_key=secret_key, secure=secure
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_minio_notification_response(
|
def get_minio_notification_response(
|
||||||
|
@ -1110,7 +1110,7 @@ mill-local==0.2.0
|
|||||||
millheater==0.10.0
|
millheater==0.10.0
|
||||||
|
|
||||||
# homeassistant.components.minio
|
# homeassistant.components.minio
|
||||||
minio==5.0.10
|
minio==7.1.12
|
||||||
|
|
||||||
# homeassistant.components.moat
|
# homeassistant.components.moat
|
||||||
moat-ble==0.1.1
|
moat-ble==0.1.1
|
||||||
|
@ -812,7 +812,7 @@ mill-local==0.2.0
|
|||||||
millheater==0.10.0
|
millheater==0.10.0
|
||||||
|
|
||||||
# homeassistant.components.minio
|
# homeassistant.components.minio
|
||||||
minio==5.0.10
|
minio==7.1.12
|
||||||
|
|
||||||
# homeassistant.components.moat
|
# homeassistant.components.moat
|
||||||
moat-ble==0.1.1
|
moat-ble==0.1.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user