Async vs sync inheritance mismatch fixes (#35088)

This commit is contained in:
Ville Skyttä 2020-05-03 00:35:55 +03:00 committed by GitHub
parent a2048b4c7a
commit 5450cda3a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ class AtagWaterHeater(AtagEntity, WaterHeaterDevice):
"""List of available operation modes."""
return OPERATION_LIST
async def set_temperature(self, **kwargs):
async def async_set_temperature(self, **kwargs):
"""Set new target temperature."""
if await self.coordinator.atag.dhw_set_temp(kwargs.get(ATTR_TEMPERATURE)):
self.async_write_ha_state()

View File

@ -60,7 +60,7 @@ class FortigateDeviceScanner(DeviceScanner):
await self.async_update_info()
return [device.mac for device in self.last_results]
async def get_device_name(self, device):
def get_device_name(self, device):
"""Return the name of the given device or None if we don't know."""
name = next(
(result.hostname for result in self.last_results if result.mac == device),

View File

@ -161,7 +161,7 @@ class PowerViewShade(ShadeEntity, CoverEntity):
self._async_update_from_command(await self._shade.stop())
await self._async_force_refresh_state()
async def set_cover_position(self, **kwargs):
async def async_set_cover_position(self, **kwargs):
"""Move the shade to a specific position."""
if ATTR_POSITION not in kwargs:
return