Skip to content

Commit

Permalink
Backport missing folder fix from home-assistant#23191
Browse files Browse the repository at this point in the history
  • Loading branch information
Jc2k committed Apr 22, 2019
1 parent ef28e2c commit 06f64dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion homeassistant/components/homekit_controller/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,14 @@ def device_config_callback(self, callback_data):

self.pairing = self.controller.pairings.get(self.hkid)
if self.pairing is not None:
pairing_file = os.path.join(
pairing_dir = os.path.join(
self.hass.config.path(),
HOMEKIT_DIR,
)
if not os.path.exists(pairing_dir):
os.makedirs(pairing_dir)
pairing_file = os.path.join(
pairing_dir,
PAIRING_FILE,
)
self.controller.save_data(pairing_file)
Expand Down

0 comments on commit 06f64dc

Please sign in to comment.