Example #1
0
 def __init__(self, component_config: dict, domain: str) -> None:
     self.__get_power = create_request_function(
         domain, component_config["configuration"]["power_path"])
     self.__get_counter = create_request_function(
         domain, component_config["configuration"]["counter_path"])
     self.component_config = component_config
     self.__store = get_inverter_value_store(component_config["id"])
     self.component_info = ComponentInfo.from_component_config(
         component_config)
Example #2
0
 def __init__(self, device_id: int,
              component_config: Union[Dict,
                                      HttpInverterSetup], url: str) -> None:
     self.__device_id = device_id
     self.component_config = dataclass_from_dict(HttpInverterSetup,
                                                 component_config)
     self.__sim_count = simcount.SimCountFactory().get_sim_counter()()
     self.simulation = {}
     self.__store = get_inverter_value_store(self.component_config.id)
     self.component_info = ComponentInfo.from_component_config(
         self.component_config)
     self.__get_power = create_request_function(
         url, self.component_config.configuration.power_path)
     self.__get_exported = create_request_function(
         url, self.component_config.configuration.exported_path)
Example #3
0
    def __init__(self, component_config: dict, domain: str) -> None:
        self.__get_power = create_request_function(
            domain, component_config["configuration"]["power_path"])
        self.__get_imported = create_request_function(
            domain, component_config["configuration"]["imported_path"])
        self.__get_exported = create_request_function(
            domain, component_config["configuration"]["exported_path"])
        self.__get_powers = [
            create_request_function(
                domain, component_config["configuration"]["power_l" + str(i) +
                                                          "_path"])
            for i in range(1, 4)
        ]

        self.component_config = component_config
        self.__store = get_counter_value_store(component_config["id"])
        self.component_info = ComponentInfo.from_component_config(
            component_config)