Skip to content

Commit

Permalink
fix: storage dir exist will raise error (#168)
Browse files Browse the repository at this point in the history
* fix: update python to python3 in myph.sh

* fix: storage dir exist error

* fix: dockerfile arg error (#169)

* revert
  • Loading branch information
wuwentao authored Jun 25, 2024
1 parent 01a3b79 commit 456c9ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/midea_ac_lan/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def __init__(self) -> None:
def _save_device_config(self, data: dict[str, Any]) -> None:
"""Save device config to json file with device id."""
storage_path = Path(self.hass.config.path(STORAGE_PATH))
Path.mkdir(storage_path, parents=True)
Path.mkdir(storage_path, parents=True, exist_ok=True)
record_file = Path(storage_path, data[CONF_DEVICE_ID], ".json")
save_json(record_file.name, data)

Expand Down

0 comments on commit 456c9ec

Please sign in to comment.