Example #1
0
 def _read_controllers(self, p_pyhouse_obj, p_xml):
     try:
         l_xml = p_xml.find('ControllerSection')
         l_ret = controllersAPI.read_all_controllers_xml(p_pyhouse_obj)
     except AttributeError as e_err:
         l_ret = {}
         l_msg = 'No Controllers found {}'.format(e_err)
         LOG.warning(l_msg)
     return l_ret
Example #2
0
 def _read_controllers(self, p_pyhouse_obj, p_xml, p_version):
     try:
         l_xml = p_xml.find("ControllerSection")
         l_ret = controllersAPI.read_all_controllers_xml(p_pyhouse_obj, l_xml, p_version)
     except AttributeError as e_err:
         l_ret = {}
         l_msg = "No Controllers found {}".format(e_err)
         LOG.warning(l_msg)
     return l_ret
Example #3
0
 def _write_lighting_xml(p_pyhouse_obj, p_house_element):
     """
     @param p_pyhouse_obj: is the whole PyHouse Object
     @param p_house_element: is the XML
     """
     l_lighting_xml = ET.Element("LightingSection")
     try:
         l_xml = lightsAPI.write_all_lights_xml(p_pyhouse_obj)
         l_lighting_xml.append(l_xml)
         l_lighting_xml.append(buttonsAPI.write_buttons_xml(p_pyhouse_obj))
         l_lighting_xml.append(controllersAPI.write_all_controllers_xml(p_pyhouse_obj))
     except AttributeError as e_err:
         l_msg = "ERROR-109: {}".format(e_err)
         LOG.error(l_msg)
         p_house_element.append(l_lighting_xml)
     return l_lighting_xml
Example #4
0
 def _write_lighting_xml(p_pyhouse_obj, p_house_element):
     """
     @param p_pyhouse_obj: is the whole PyHouse Object
     @param p_house_element: is the XML
     """
     l_lighting_xml = ET.Element('LightingSection')
     try:
         l_xml = lightsAPI.write_all_lights_xml(p_pyhouse_obj)
         l_lighting_xml.append(l_xml)
         l_lighting_xml.append(buttonsAPI.write_buttons_xml(p_pyhouse_obj))
         l_lighting_xml.append(
             controllersAPI.write_all_controllers_xml(p_pyhouse_obj))
     except AttributeError as e_err:
         l_msg = 'ERROR-109: {}'.format(e_err)
         LOG.error(l_msg)
         p_house_element.append(l_lighting_xml)
     return l_lighting_xml