Beispiel #1
0
 async def async_update_group_list_with_names(self):
     xml = ControllerDictBuilder().get_mnet_list().to_xml()
     xml_response = await self.async_send_command(xml)
     parsed = parse_xml(xml_response)
     groups_info = get_group_info_list_from_dict(parsed)
     for group in self.groups:
         group.web_name = groups_info[group.group_id]["web_name"]
         group.lcd_name = groups_info[group.group_id]["lcd_name"]
Beispiel #2
0
 async def async_update_single_group_bulk(self, group):
     xml = ControllerDictBuilder().get_single_bulk_data(
         group.group_id).to_xml()
     xml_response = await self.async_send_command(xml)
     parsed = parse_xml(xml_response)
     group.bulk_string = get_single_bulk_from_dict(parsed)
     group.rac_sw = get_single_racsw_from_dict(parsed)
     group.energy_control = get_single_energycontrol_from_dict(parsed)
     return group
Beispiel #3
0
 async def set_mode_for_group(self, group, mode):
     xml = ControllerDictBuilder().set_mnet(group.group_id,
                                            mode=mode).to_xml()
     await self.async_send_command(xml)
     await self.async_update_single_group_bulk(group)
Beispiel #4
0
 async def update_lcd_name_for_group(self, group):
     xml = ControllerDictBuilder().get_mnet(group.group_id,
                                            lcd_name=True).to_xml()
     xml_response = await self.async_send_command(xml)
     parsed = parse_xml(xml_response)
     group.lcd_name = get_lcd_name_from_dict(parsed)
Beispiel #5
0
 async def async_initialize_system_data(self):
     xml = ControllerDictBuilder().get_system_data().to_xml()
     xml_response = await self.async_send_command(xml)
     parsed = parse_xml(xml_response)
     self.system_data = get_system_data_from_dict(parsed)
Beispiel #6
0
 async def async_initialize_group_list(self):
     xml = ControllerDictBuilder().get_mnet_group_list().to_xml()
     xml_response = await self.async_send_command(xml)
     parsed = parse_xml(xml_response)
     self.groups = get_group_list_from_dict(parsed)
     await self.async_update_group_list_with_names()
Beispiel #7
0
 async def reset_error_for_group(self, group):
     xml = ControllerDictBuilder().set_mnet(group.group_id,
                                            error_sign="RESET").to_xml()
     await self.async_send_command(xml)
     await self.async_update_single_group_bulk(group)
Beispiel #8
0
 async def set_remote_controller_for_group(self, group, remote_controller):
     xml = ControllerDictBuilder().set_mnet(
         group.group_id, remote_controller=remote_controller).to_xml()
     await self.async_send_command(xml)
     await self.async_update_single_group_bulk(group)
Beispiel #9
0
 async def set_fan_speed_for_group(self, group, fan_speed):
     xml = ControllerDictBuilder().set_mnet(group.group_id,
                                            fan_speed=fan_speed).to_xml()
     await self.async_send_command(xml)
     await self.async_update_single_group_bulk(group)
Beispiel #10
0
 async def set_air_direction_for_group(self, group, air_direction):
     xml = ControllerDictBuilder().set_mnet(
         group.group_id, air_direction=air_direction).to_xml()
     await self.async_send_command(xml)
     await self.async_update_single_group_bulk(group)
Beispiel #11
0
 async def set_temperature_fahrenheit_for_group(self, group, temperature):
     xml = ControllerDictBuilder().set_mnet(group.group_id,
                                            set_temp=f_to_c(
                                                int(temperature))).to_xml()
     await self.async_send_command(xml)
     await self.async_update_single_group_bulk(group)