Fix .esphome path when not using envvar (#5440)

This commit is contained in:
Jesse Hills 2023-09-28 11:20:44 +13:00 committed by GitHub
parent 57b7dd0fa2
commit 4ac4492241
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -558,7 +558,7 @@ class EsphomeCore:
def data_dir(self):
if is_ha_addon():
return os.path.join("/data")
if get_str_env("ESPHOME_DATA_DIR", None) is not None:
if "ESPHOME_DATA_DIR" in os.environ:
return get_str_env("ESPHOME_DATA_DIR", None)
return self.relative_config_path(".esphome")