Expose Configuration path to frontend (#3660)

* Expose config path to frontend

* Fix typo

* Add deleted code.
pull/3640/head
Justin Weberg 2016-10-03 02:04:43 -05:00 committed by Paulus Schoutsen
parent b586e80977
commit 0219df17f5
2 changed files with 3 additions and 0 deletions

View File

@ -1088,6 +1088,7 @@ class Config(object):
'location_name': self.location_name, 'location_name': self.location_name,
'time_zone': time_zone.zone, 'time_zone': time_zone.zone,
'components': self.components, 'components': self.components,
'config_dir': self.config_dir,
'version': __version__ 'version': __version__
} }

View File

@ -448,6 +448,7 @@ class TestConfig(unittest.TestCase):
def test_as_dict(self): def test_as_dict(self):
"""Test as dict.""" """Test as dict."""
self.config.config_dir = '/tmp/ha-config'
expected = { expected = {
'latitude': None, 'latitude': None,
'longitude': None, 'longitude': None,
@ -455,6 +456,7 @@ class TestConfig(unittest.TestCase):
'location_name': None, 'location_name': None,
'time_zone': 'UTC', 'time_zone': 'UTC',
'components': [], 'components': [],
'config_dir': '/tmp/ha-config',
'version': __version__, 'version': __version__,
} }