@@ -169,7 +169,7 @@ async def ev_charger_data(
169169 """
170170
171171 @abstractmethod
172- async def set_power (self , component_id : int , power_w : float ) -> Empty :
172+ async def set_power (self , component_id : int , power_w : float ) -> None :
173173 """Send request to the Microgrid to set power for component.
174174
175175 If power > 0, then component will be charged with this power.
@@ -180,9 +180,6 @@ async def set_power(self, component_id: int, power_w: float) -> Empty:
180180 Args:
181181 component_id: id of the component to set power.
182182 power_w: power to set for the component.
183-
184- Returns:
185- Empty response.
186183 """
187184
188185 @abstractmethod
@@ -567,7 +564,7 @@ async def ev_charger_data(
567564 EVChargerData .from_proto ,
568565 ).new_receiver (maxsize = maxsize )
569566
570- async def set_power (self , component_id : int , power_w : float ) -> Empty :
567+ async def set_power (self , component_id : int , power_w : float ) -> None :
571568 """Send request to the Microgrid to set power for component.
572569
573570 If power > 0, then component will be charged with this power.
@@ -579,9 +576,6 @@ async def set_power(self, component_id: int, power_w: float) -> Empty:
579576 component_id: id of the component to set power.
580577 power_w: power to set for the component.
581578
582- Returns:
583- Empty response.
584-
585579 Raises:
586580 AioRpcError: if connection to Microgrid API cannot be established or
587581 when the api call exceeded timeout
@@ -590,7 +584,7 @@ async def set_power(self, component_id: int, power_w: float) -> Empty:
590584 if power_w >= 0 :
591585 # grpc.aio is missing types and mypy thinks this is not
592586 # async iterable, but it is
593- result : Empty = await self .api .Charge (
587+ await self .api .Charge (
594588 microgrid_pb .PowerLevelParam (
595589 component_id = component_id , power_w = math .floor (power_w )
596590 ),
@@ -600,7 +594,7 @@ async def set_power(self, component_id: int, power_w: float) -> Empty:
600594 # grpc.aio is missing types and mypy thinks this is not
601595 # async iterable, but it is
602596 power_w *= - 1
603- result = await self .api .Discharge (
597+ await self .api .Discharge (
604598 microgrid_pb .PowerLevelParam (
605599 component_id = component_id , power_w = math .floor (power_w )
606600 ),
@@ -615,7 +609,6 @@ async def set_power(self, component_id: int, power_w: float) -> Empty:
615609 details = msg ,
616610 debug_error_string = err .debug_error_string (),
617611 )
618- return result
619612
620613 async def set_bounds (
621614 self ,
0 commit comments