@@ -58,7 +58,9 @@ async def async_select_option(self, option: str) -> None:
5858
5959 if success :
6060 self ._attr_current_option = option
61+ self .coordinator .rated_information = None
6162 self .async_write_ha_state ()
63+ await self .coordinator .async_request_refresh ()
6264 _LOGGER .info (f"Set AC Input Range to { option } " )
6365 else :
6466 _LOGGER .error (f"Failed to set AC Input Range to { option } " )
@@ -116,9 +118,8 @@ async def async_select_option(self, option: str) -> None:
116118 self .coordinator .inverter .set_output_source_priority , val
117119 )
118120 if success :
119- # Optimistically update? Or wait for poll.
120- # Wait for poll is safer but slower.
121- pass
121+ self .coordinator .rated_information = None
122+ await self .coordinator .async_request_refresh ()
122123
123124class AxpertChargerPrioritySelect (AxpertEntity , SelectEntity ):
124125 """Select entity for Charger Source Priority."""
@@ -155,7 +156,8 @@ async def async_select_option(self, option: str) -> None:
155156 self .coordinator .inverter .set_charger_source_priority , val
156157 )
157158 if success :
158- pass
159+ self .coordinator .rated_information = None
160+ await self .coordinator .async_request_refresh ()
159161
160162
161163class AxpertBatteryTypeSelect (AxpertEntity , SelectEntity ):
@@ -191,7 +193,10 @@ async def async_select_option(self, option: str) -> None:
191193 success = await self .hass .async_add_executor_job (
192194 self .coordinator .inverter .set_battery_type , val
193195 )
194- if not success :
196+ if success :
197+ self .coordinator .rated_information = None
198+ await self .coordinator .async_request_refresh ()
199+ else :
195200 _LOGGER .warning (f"Failed to set Battery Type to { option } " )
196201 self ._attr_available = False
197202 self .async_write_ha_state ()
0 commit comments