Im having an issue with a master slave setup after updating to 0.26.x. It seems like it is not picking up the default configuration directory anymore, but I’m not seeing a way to set it in the remote.py
This is the startup.py script.
#! /usr/bin/python3
#
import homeassistant.remote as remote
import homeassistant.bootstrap as bootstrap
import homeassistant.config as config
# Location of the Master API: host, password, port.
# Password and port are optional.
remote_api = remote.API("192.168.1.250", port= 8123)
# Initialize slave
hass = remote.HomeAssistant(remote_api)
myconfig = config.load_yaml_config_file("/home/pi/.homeassistant/configuration.yaml")
# To add an interface to the slave on localhost:8123
#bootstrap.setup_component(hass, 'frontend', myconfig)
bootstrap.setup_component(hass, 'switch', myconfig)
bootstrap.setup_component(hass, 'input_select', myconfig)
bootstrap.setup_component(hass, 'automation', myconfig)
bootstrap.setup_component(hass, 'script', myconfig)
hass.start()
hass.block_till_stopped()
This is the error:
Traceback (most recent call last):
File "./hass.py", line 23, in <module>
hass.start()
File "/usr/local/lib/python3.4/dist-packages/homeassistant/remote.py", line 139, in start
if not bootstrap.setup_component(self, 'api'):
File "/usr/local/lib/python3.4/dist-packages/homeassistant/bootstrap.py", line 42, in setup_component
_ensure_loader_prepared(hass)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/bootstrap.py", line 371, in _ensure_loader_prepared
loader.prepare(hass)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/loader.py", line 56, in prepare
custom_path = hass.config.path("custom_components")
File "/usr/local/lib/python3.4/dist-packages/homeassistant/core.py", line 762, in path
raise HomeAssistantError("config_dir is not set")
homeassistant.exceptions.HomeAssistantError: config_dir is not set
pi@raspberrypi:~$ vim hass.py