From aa4cadf9cd1298cb41c3ad8687b5bc600d24b08d Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 31 Mar 2026 10:09:35 +0000 Subject: [PATCH] Use hass.config.config_dir --- homeassistant/components/tuya/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/tuya/__init__.py b/homeassistant/components/tuya/__init__.py index 81e7b330e58..6aaec9cb0ed 100644 --- a/homeassistant/components/tuya/__init__.py +++ b/homeassistant/components/tuya/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations import logging +from pathlib import Path from typing import Any, NamedTuple from tuya_device_handlers.devices import register_tuya_quirks @@ -108,7 +109,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: TuyaConfigEntry) -> bool model_id=device.product_id, ) - await hass.async_add_executor_job(register_tuya_quirks, "/config/tuya_quirks/") + await hass.async_add_executor_job( + register_tuya_quirks, str(Path(hass.config.config_dir, "tuya_quirks")) + ) await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) # If the device does not register any entities, the device does not need to subscribe # So the subscription is here