mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Allow config.path to take multiple arguments
This commit is contained in:
parent
0a28f3f648
commit
c719e7dc31
@ -937,9 +937,9 @@ class Config(object):
|
|||||||
# Directory that holds the configuration
|
# Directory that holds the configuration
|
||||||
self.config_dir = os.path.join(os.getcwd(), 'config')
|
self.config_dir = os.path.join(os.getcwd(), 'config')
|
||||||
|
|
||||||
def path(self, path):
|
def path(self, *path):
|
||||||
""" Returns path to the file within the config dir. """
|
""" Returns path to the file within the config dir. """
|
||||||
return os.path.join(self.config_dir, path)
|
return os.path.join(self.config_dir, *path)
|
||||||
|
|
||||||
def temperature(self, value, unit):
|
def temperature(self, value, unit):
|
||||||
""" Converts temperature to user preferred unit if set. """
|
""" Converts temperature to user preferred unit if set. """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user