Remove home-assistant devices options (#293)

* Remove home-assistant devices options

* fix version mix/max snapshot

* fix wrong path

* fix import

* fix restore

* fix

* make exists call robust

* Update addon.py

* remove old custom function

* Update homeassistant.py

* Update homeassistant.py

* Update homeassistant.py

* Update snapshot.py

* Update validate.py

* Update snapshot.py

* Update homeassistant.py

* fix lint 1

* fix lint

* fix lint

* Update snapshot.py

* Update homeassistant.py

* Update homeassistant.py

* Update homeassistant.py
This commit is contained in:
Pascal Vizeli
2018-01-04 12:52:17 +01:00
committed by GitHub
parent c84151e9e8
commit 78ec0d1314
12 changed files with 86 additions and 114 deletions

View File

@@ -26,14 +26,10 @@ class DockerHomeAssistant(DockerInterface):
@property
def devices(self):
"""Create list of special device to map into docker."""
if not self._homeassistant.devices:
return None
devices = []
for device in self._homeassistant.devices:
devices.append("/dev/{0}:/dev/{0}:rwm".format(device))
return devices
for device in self._hardware.serial_devices:
devices.append(f"{device}:{device}:rwm")
return devices or None
def _run(self):
"""Run docker image.