Remove unnecessary boolean checks for callables (#78819)
This commit is contained in:
parent
c6fd2bde46
commit
faad904cbc
3 changed files with 3 additions and 4 deletions
|
@ -128,7 +128,6 @@ class InverterNumberEntity(NumberEntity):
|
|||
|
||||
async def async_set_native_value(self, value: float) -> None:
|
||||
"""Set new value."""
|
||||
if self.entity_description.setter:
|
||||
await self.entity_description.setter(self._inverter, int(value))
|
||||
self._attr_native_value = value
|
||||
self.async_write_ha_state()
|
||||
|
|
|
@ -797,4 +797,4 @@ class PlenticoreDataSensor(CoordinatorEntity, SensorEntity):
|
|||
|
||||
raw_value = self.coordinator.data[self.module_id][self.data_id]
|
||||
|
||||
return self._formatter(raw_value) if self._formatter else raw_value
|
||||
return self._formatter(raw_value)
|
||||
|
|
|
@ -134,7 +134,7 @@ class SchemaCommonFlowHandler:
|
|||
self._options.update(user_input)
|
||||
|
||||
next_step_id: str = step_id
|
||||
if form_step.next_step and (user_input is not None or form_step.schema is None):
|
||||
if user_input is not None or form_step.schema is None:
|
||||
# Get next step
|
||||
next_step_id_or_end_flow = form_step.next_step(self._options)
|
||||
if next_step_id_or_end_flow is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue