feat: add SmartObject and TemplateLibrary classes
This commit is contained in:
14
templatelibrary.py
Normal file
14
templatelibrary.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import appdaemon.plugins.hass.hassapi as hass
|
||||
|
||||
class TemplateLibrary(hass.Hass):
|
||||
def initialize(self):
|
||||
self.fire_event('template_library_loaded',library_name = self.name)
|
||||
|
||||
def get_template_library(self):
|
||||
if "templates_library" in self.args:
|
||||
return self.args["templates_library"]
|
||||
else:
|
||||
message = f"Can't find 'templates_library'"
|
||||
self.log(message,level = "ERROR", log = "main_log")
|
||||
self.log(message,level = "ERROR", log = "error_log")
|
||||
return None
|
||||
Reference in New Issue
Block a user