mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-11 11:16:30 +00:00
Fix gpio mapping on amd64 systems (#634)
This commit is contained in:
parent
124ce0b8b7
commit
9eee8eade6
@ -1,6 +1,7 @@
|
|||||||
"""Init file for HassIO addon docker object."""
|
"""Init file for HassIO addon docker object."""
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
import docker
|
import docker
|
||||||
import requests
|
import requests
|
||||||
@ -204,12 +205,12 @@ class DockerAddon(DockerInterface):
|
|||||||
|
|
||||||
# GPIO support
|
# GPIO support
|
||||||
if self.addon.with_gpio:
|
if self.addon.with_gpio:
|
||||||
|
for gpio_path in ("/sys/class/gpio", "/sys/devices/platform/soc"):
|
||||||
|
if not Path(gpio_path).exists():
|
||||||
|
continue
|
||||||
volumes.update({
|
volumes.update({
|
||||||
"/sys/class/gpio": {
|
gpio_path: {
|
||||||
'bind': "/sys/class/gpio", 'mode': 'rw'
|
'bind': gpio_path, 'mode': 'rw'
|
||||||
},
|
|
||||||
"/sys/devices/platform/soc": {
|
|
||||||
'bind': "/sys/devices/platform/soc", 'mode': 'rw'
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user