Esempio n. 1
0
 def _read_buttons(self, p_pyhouse_obj, p_xml):
     try:
         l_xml = p_xml.find('ButtonSection')
         l_ret = buttonsAPI.read_all_buttons_xml(p_pyhouse_obj, l_xml)
     except AttributeError as e_err:
         l_ret = {}
         l_msg = 'No Buttons found {}'.format(e_err)
         LOG.warning(l_msg)
     return l_ret
Esempio n. 2
0
 def _read_buttons(self, p_pyhouse_obj, p_xml, p_version):
     try:
         l_xml = p_xml.find("ButtonSection")
         l_ret = buttonsAPI.read_all_buttons_xml(p_pyhouse_obj, l_xml, p_version)
     except AttributeError as e_err:
         l_ret = {}
         l_msg = "No Buttons found {}".format(e_err)
         LOG.warning(l_msg)
     return l_ret
Esempio n. 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
Esempio n. 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