diff --git a/homeassistant/auth/providers/__init__.py b/homeassistant/auth/providers/__init__.py index bb0fc55b5c4dd05cb6cb241c6af07081dc085f33..1fa70e42b3fe3caf521050513819cfd5d60cda26 100644 --- a/homeassistant/auth/providers/__init__.py +++ b/homeassistant/auth/providers/__init__.py @@ -116,7 +116,6 @@ class AuthProvider: async def async_initialize(self) -> None: """Initialize the auth provider.""" - pass async def auth_provider_from_config( diff --git a/homeassistant/components/adguard/config_flow.py b/homeassistant/components/adguard/config_flow.py index 3657d4ee3ad090d89491b6982e0a8a11089a81e8..e2a226eb4ce65930b626fd5a3c4af7499411461f 100644 --- a/homeassistant/components/adguard/config_flow.py +++ b/homeassistant/components/adguard/config_flow.py @@ -30,10 +30,6 @@ class AdGuardHomeFlowHandler(ConfigFlow): _hassio_discovery = None - def __init__(self): - """Initialize AgGuard Home flow.""" - pass - async def _show_setup_form(self, errors=None): """Show the setup form to the user.""" return self.async_show_form( diff --git a/homeassistant/components/alexa/entities.py b/homeassistant/components/alexa/entities.py index e5eca399b9cde65e6944dc5d9e4937efd3218ca0..0943d1a4e52d9c9fa740b4f41873afb532ad0334 100644 --- a/homeassistant/components/alexa/entities.py +++ b/homeassistant/components/alexa/entities.py @@ -252,7 +252,6 @@ class AlexaEntity: Raises _UnsupportedInterface. """ - pass def interfaces(self): """Return a list of supported interfaces. diff --git a/homeassistant/components/auth/indieauth.py b/homeassistant/components/auth/indieauth.py index a2d015c279b3b2c02fd5d0ca06d2141ea0bae9ff..cd8e797876fd757e7e4d6ea26adbba1ac276239e 100644 --- a/homeassistant/components/auth/indieauth.py +++ b/homeassistant/components/auth/indieauth.py @@ -90,21 +90,16 @@ async def fetch_redirect_uris(hass, url): except asyncio.TimeoutError: _LOGGER.error("Timeout while looking up redirect_uri %s", url) - pass except aiohttp.client_exceptions.ClientSSLError: _LOGGER.error("SSL error while looking up redirect_uri %s", url) - pass except aiohttp.client_exceptions.ClientOSError as ex: _LOGGER.error("OS error while looking up redirect_uri %s: %s", url, ex.strerror) - pass except aiohttp.client_exceptions.ClientConnectionError: _LOGGER.error( "Low level connection error while looking up redirect_uri %s", url ) - pass except aiohttp.client_exceptions.ClientError: _LOGGER.error("Unknown error while looking up redirect_uri %s", url) - pass # Authorization endpoints verifying that a redirect_uri is allowed for use # by a client MUST look for an exact match of the given redirect_uri in the diff --git a/homeassistant/components/cast/helpers.py b/homeassistant/components/cast/helpers.py index e82f6c9e4ed186dc6fa565557f1f9e1d85388981..b39f8a6ef25f61d98a99f4c9703ac053da67f804 100644 --- a/homeassistant/components/cast/helpers.py +++ b/homeassistant/components/cast/helpers.py @@ -173,7 +173,6 @@ class CastStatusListener: @staticmethod def added_to_multizone(group_uuid): """Handle the cast added to a group.""" - pass def removed_from_multizone(self, group_uuid): """Handle the cast removed from a group.""" @@ -182,7 +181,6 @@ class CastStatusListener: def multizone_new_cast_status(self, group_uuid, cast_status): """Handle reception of a new CastStatus for a group.""" - pass def multizone_new_media_status(self, group_uuid, media_status): """Handle reception of a new MediaStatus for a group.""" @@ -224,7 +222,6 @@ class DynamicGroupCastStatusListener: def new_cast_status(self, cast_status): """Handle reception of a new CastStatus.""" - pass def new_media_status(self, media_status): """Handle reception of a new MediaStatus.""" diff --git a/homeassistant/components/citybikes/sensor.py b/homeassistant/components/citybikes/sensor.py index 8e0b883b72693a21b69ac706086363eac71266ab..799fe6acc70a896c1ca0fa2a327fb072c6232fad 100644 --- a/homeassistant/components/citybikes/sensor.py +++ b/homeassistant/components/citybikes/sensor.py @@ -125,8 +125,6 @@ STATIONS_RESPONSE_SCHEMA = vol.Schema( class CityBikesRequestError(Exception): """Error to indicate a CityBikes API request has failed.""" - pass - async def async_citybikes_request(hass, uri, schema): """Perform a request to CityBikes API endpoint, and parse the response.""" diff --git a/homeassistant/components/cover/__init__.py b/homeassistant/components/cover/__init__.py index e63054d23b2b7fa9110061cba8b322000fc8ef34..cb2812f319b40a8e4c19deb80329c5ef6e264acd 100644 --- a/homeassistant/components/cover/__init__.py +++ b/homeassistant/components/cover/__init__.py @@ -162,7 +162,6 @@ class CoverDevice(Entity): None is unknown, 0 is closed, 100 is fully open. """ - pass @property def current_cover_tilt_position(self): @@ -170,7 +169,6 @@ class CoverDevice(Entity): None is unknown, 0 is closed, 100 is fully open. """ - pass @property def state(self): @@ -223,12 +221,10 @@ class CoverDevice(Entity): @property def is_opening(self): """Return if the cover is opening or not.""" - pass @property def is_closing(self): """Return if the cover is closing or not.""" - pass @property def is_closed(self): @@ -267,7 +263,6 @@ class CoverDevice(Entity): def set_cover_position(self, **kwargs): """Move the cover to a specific position.""" - pass async def async_set_cover_position(self, **kwargs): """Move the cover to a specific position.""" @@ -275,7 +270,6 @@ class CoverDevice(Entity): def stop_cover(self, **kwargs): """Stop the cover.""" - pass async def async_stop_cover(self, **kwargs): """Stop the cover.""" @@ -283,7 +277,6 @@ class CoverDevice(Entity): def open_cover_tilt(self, **kwargs: Any) -> None: """Open the cover tilt.""" - pass async def async_open_cover_tilt(self, **kwargs): """Open the cover tilt.""" @@ -291,7 +284,6 @@ class CoverDevice(Entity): def close_cover_tilt(self, **kwargs: Any) -> None: """Close the cover tilt.""" - pass async def async_close_cover_tilt(self, **kwargs): """Close the cover tilt.""" @@ -299,7 +291,6 @@ class CoverDevice(Entity): def set_cover_tilt_position(self, **kwargs): """Move the cover tilt to a specific position.""" - pass async def async_set_cover_tilt_position(self, **kwargs): """Move the cover tilt to a specific position.""" @@ -309,7 +300,6 @@ class CoverDevice(Entity): def stop_cover_tilt(self, **kwargs): """Stop the cover.""" - pass async def async_stop_cover_tilt(self, **kwargs): """Stop the cover.""" diff --git a/homeassistant/components/daikin/climate.py b/homeassistant/components/daikin/climate.py index d46ea26d4870dba3cb7caefde9e63a3b3a08e3b4..8b5724e014d3f4eef9173f47abb7151b003ed247 100644 --- a/homeassistant/components/daikin/climate.py +++ b/homeassistant/components/daikin/climate.py @@ -78,7 +78,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= Can only be called when a user accidentally mentions the platform in their config. But even in that case it would have been ignored. """ - pass async def async_setup_entry(hass, entry, async_add_entities): diff --git a/homeassistant/components/daikin/sensor.py b/homeassistant/components/daikin/sensor.py index e3e2e6a0f27fc2505f9bc0c2522f259dfc779e8a..1bda31fc6b0e792a1ae47590295b5527c9e537a7 100644 --- a/homeassistant/components/daikin/sensor.py +++ b/homeassistant/components/daikin/sensor.py @@ -22,7 +22,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= Can only be called when a user accidentally mentions the platform in their config. But even in that case it would have been ignored. """ - pass async def async_setup_entry(hass, entry, async_add_entities): diff --git a/homeassistant/components/daikin/switch.py b/homeassistant/components/daikin/switch.py index e22c0b04995daf7486ea2214a5a4a4a6fb0a6405..b7131c29bdd4dc4f9269c6e2ad064b014f518bcc 100644 --- a/homeassistant/components/daikin/switch.py +++ b/homeassistant/components/daikin/switch.py @@ -16,7 +16,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= Can only be called when a user accidentally mentions the platform in their config. But even in that case it would have been ignored. """ - pass async def async_setup_entry(hass, entry, async_add_entities): diff --git a/homeassistant/components/fan/__init__.py b/homeassistant/components/fan/__init__.py index 76bd16a6363446a7b606e47b7a7588e4bc62d5c5..a395a5da47004d32d6a66aa40219295069aba19b 100644 --- a/homeassistant/components/fan/__init__.py +++ b/homeassistant/components/fan/__init__.py @@ -141,7 +141,6 @@ class FanEntity(ToggleEntity): def oscillate(self, oscillating: bool) -> None: """Oscillate the fan.""" - pass async def async_oscillate(self, oscillating: bool): """Oscillate the fan.""" diff --git a/homeassistant/components/fibaro/__init__.py b/homeassistant/components/fibaro/__init__.py index 89529046f85a3890cf1d1904c33d36a8ef356529..dcbffe2a568b071a8b4b1457c57181d0f7be316b 100644 --- a/homeassistant/components/fibaro/__init__.py +++ b/homeassistant/components/fibaro/__init__.py @@ -462,10 +462,6 @@ class FibaroDevice(Entity): """Get polling requirement from fibaro device.""" return False - def update(self): - """Call to update state.""" - pass - @property def device_state_attributes(self): """Return the state attributes of the device.""" diff --git a/homeassistant/components/fronius/sensor.py b/homeassistant/components/fronius/sensor.py index 722dc2dc65909edd0fd4efcb99829f36ae2d8bed..7c966a6fa4ae1d8500acdb92ec7636cc09d56d10 100644 --- a/homeassistant/components/fronius/sensor.py +++ b/homeassistant/components/fronius/sensor.py @@ -186,7 +186,6 @@ class FroniusAdapter: async def _update(self): """Return values of interest.""" - pass async def register(self, sensor): """Register child sensor for update subscriptions.""" diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index d9a39ce5726e99c14e6f1568aa7da25863d2effd..2ce710ea4194cdd266ac4964e865d4fd0e8efd48 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -421,11 +421,9 @@ class IndexView(web_urldispatcher.AbstractResource): def freeze(self) -> None: """Freeze the resource.""" - pass def raw_match(self, path: str) -> bool: """Perform a raw match against path.""" - pass def get_template(self): """Get template.""" diff --git a/homeassistant/components/homekit/accessories.py b/homeassistant/components/homekit/accessories.py index ddcc795d262519f90a3792568ce6f1e0b19e1f1b..3d014d13c5dc250c218ce8c84162b2070b659be8 100644 --- a/homeassistant/components/homekit/accessories.py +++ b/homeassistant/components/homekit/accessories.py @@ -235,7 +235,6 @@ class HomeBridge(Bridge): def setup_message(self): """Prevent print of pyhap setup message to terminal.""" - pass class HomeDriver(AccessoryDriver): diff --git a/homeassistant/components/huawei_lte/__init__.py b/homeassistant/components/huawei_lte/__init__.py index 5d618c1fdb532256b6f159d455ba2e6247411fe2..272efa5d7226af8271d7ca86ae588ec1d831a2dd 100644 --- a/homeassistant/components/huawei_lte/__init__.py +++ b/homeassistant/components/huawei_lte/__init__.py @@ -600,7 +600,6 @@ class HuaweiLteBaseEntity(Entity): async def async_update_options(self, config_entry: ConfigEntry) -> None: """Update config entry options.""" - pass async def async_added_to_hass(self) -> None: """Connect to update signals.""" diff --git a/homeassistant/components/hue/light.py b/homeassistant/components/hue/light.py index 8a3a5c84c025bcc190e46e4fb142f07c1e777681..fa9dfe7615f916afc0badce5987d83b93fb50ea6 100644 --- a/homeassistant/components/hue/light.py +++ b/homeassistant/components/hue/light.py @@ -68,7 +68,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= Can only be called when a user accidentally mentions hue platform in their config. But even in that case it would have been ignored. """ - pass def create_light(item_class, coordinator, bridge, is_group, api, item_id): diff --git a/homeassistant/components/icloud/device_tracker.py b/homeassistant/components/icloud/device_tracker.py index 47a302e2f267581a9f6503e08dce1ffb4c63cc59..0b24541688717771abfb26e6717058dfdc089340 100644 --- a/homeassistant/components/icloud/device_tracker.py +++ b/homeassistant/components/icloud/device_tracker.py @@ -24,7 +24,6 @@ async def async_setup_scanner( hass: HomeAssistantType, config, see, discovery_info=None ): """Old way of setting up the iCloud tracker.""" - pass async def async_setup_entry( diff --git a/homeassistant/components/incomfort/climate.py b/homeassistant/components/incomfort/climate.py index 7d91ca012b9396195d88509cac9b76f4346739f4..464ff98994101e288843b8c73eff92bccf11f3cc 100644 --- a/homeassistant/components/incomfort/climate.py +++ b/homeassistant/components/incomfort/climate.py @@ -90,4 +90,3 @@ class InComfortClimate(IncomfortChild, ClimateDevice): async def async_set_hvac_mode(self, hvac_mode: str) -> None: """Set new target hvac mode.""" - pass diff --git a/homeassistant/components/isy994/binary_sensor.py b/homeassistant/components/isy994/binary_sensor.py index 917dedd5c53a87f992928c6c3676b2973cd3071a..30b26ea5d2421e38933292584b847c6b3f6ce6f0 100644 --- a/homeassistant/components/isy994/binary_sensor.py +++ b/homeassistant/components/isy994/binary_sensor.py @@ -319,7 +319,6 @@ class ISYBinarySensorHeartbeat(ISYDevice, BinarySensorDevice): We listen directly to the Control events for this device. """ - pass @property def value(self) -> object: diff --git a/homeassistant/components/mailbox/__init__.py b/homeassistant/components/mailbox/__init__.py index 8526f6658c70b4f4f662f6c57426de14405f38a9..2275c5eba48d918ed01837f1e39a9046b3efecab 100644 --- a/homeassistant/components/mailbox/__init__.py +++ b/homeassistant/components/mailbox/__init__.py @@ -177,8 +177,6 @@ class Mailbox: class StreamError(Exception): """Media streaming exception.""" - pass - class MailboxView(HomeAssistantView): """Base mailbox view.""" diff --git a/homeassistant/components/media_extractor/__init__.py b/homeassistant/components/media_extractor/__init__.py index 7dc05368dcde602b4d45e3c74637d0dead5313b3..af5ada7d2c94fae41279816db2622cdeed90c244 100644 --- a/homeassistant/components/media_extractor/__init__.py +++ b/homeassistant/components/media_extractor/__init__.py @@ -58,14 +58,10 @@ def setup(hass, config): class MEDownloadException(Exception): """Media extractor download exception.""" - pass - class MEQueryException(Exception): """Media extractor query exception.""" - pass - class MediaExtractor: """Class which encapsulates all extraction logic.""" diff --git a/homeassistant/components/mqtt/discovery.py b/homeassistant/components/mqtt/discovery.py index ce8207fc28d82b8cb3b3e77ec80bf57213716e1f..1f2b7162556a10b05ef024471f330733395a906c 100644 --- a/homeassistant/components/mqtt/discovery.py +++ b/homeassistant/components/mqtt/discovery.py @@ -56,8 +56,6 @@ def set_discovery_hash(hass, discovery_hash): class MQTTConfig(dict): """Dummy class to allow adding attributes.""" - pass - async def async_start( hass: HomeAssistantType, discovery_topic, hass_config, config_entry=None diff --git a/homeassistant/components/openuv/config_flow.py b/homeassistant/components/openuv/config_flow.py index 9874cadb5665b5f565e9a43b93eadda63d623c22..aa6e58d60362372d4bc10c03da93c709038f7c18 100644 --- a/homeassistant/components/openuv/config_flow.py +++ b/homeassistant/components/openuv/config_flow.py @@ -35,10 +35,6 @@ class OpenUvFlowHandler(config_entries.ConfigFlow): VERSION = 2 CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL - def __init__(self): - """Initialize the config flow.""" - pass - async def _show_form(self, errors=None): """Show the form to the user.""" data_schema = vol.Schema( diff --git a/homeassistant/components/plex/media_player.py b/homeassistant/components/plex/media_player.py index aea8ecadaff2aa833c23fc18c14d85b67e3c451f..00d1b6084ad0077e776c6768d99ff02b709943df 100644 --- a/homeassistant/components/plex/media_player.py +++ b/homeassistant/components/plex/media_player.py @@ -42,14 +42,6 @@ from .const import ( _LOGGER = logging.getLogger(__name__) -async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): - """Set up the Plex media_player platform. - - Deprecated. - """ - pass - - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up Plex media_player from a config entry.""" server_id = config_entry.data[CONF_SERVER_IDENTIFIER] diff --git a/homeassistant/components/plex/sensor.py b/homeassistant/components/plex/sensor.py index b1e93aec8c00da9623d231bab8780077c4140b47..0e3aa5d4469a9ab2ebf4211412759a4346b9aad0 100644 --- a/homeassistant/components/plex/sensor.py +++ b/homeassistant/components/plex/sensor.py @@ -17,14 +17,6 @@ from .const import ( _LOGGER = logging.getLogger(__name__) -async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): - """Set up the Plex sensor platform. - - Deprecated. - """ - pass - - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up Plex sensor from a config entry.""" server_id = config_entry.data[CONF_SERVER_IDENTIFIER] diff --git a/homeassistant/components/point/__init__.py b/homeassistant/components/point/__init__.py index bb591b79884d5bfc236a2738d9b3cea4d6c9ce74..d2e4826ba2d7c6d7ad28dd1096feff94de8e6695 100644 --- a/homeassistant/components/point/__init__.py +++ b/homeassistant/components/point/__init__.py @@ -271,7 +271,6 @@ class MinutPointEntity(Entity): async def _update_callback(self): """Update the value of the sensor.""" - pass @property def available(self): diff --git a/homeassistant/components/python_script/__init__.py b/homeassistant/components/python_script/__init__.py index 6ec94aa8e52a9591e7812bca0d321310ff2a4b3d..36963dc2f20e8df0b1eb3094a5a4e0415424b487 100644 --- a/homeassistant/components/python_script/__init__.py +++ b/homeassistant/components/python_script/__init__.py @@ -72,8 +72,6 @@ ALLOWED_DT_UTIL = { class ScriptError(HomeAssistantError): """When a script error occurs.""" - pass - def setup(hass, config): """Initialize the Python script component.""" @@ -216,7 +214,6 @@ class StubPrinter: def __init__(self, _getattr_): """Initialize our printer.""" - pass def _call_print(self, *objects, **kwargs): """Print text.""" diff --git a/homeassistant/components/rflink/light.py b/homeassistant/components/rflink/light.py index 01004a3b45a425e47e47c0fcee7bbbb4def99c0c..18650d2038e5352d8579fdc3061ac847e35f3877 100644 --- a/homeassistant/components/rflink/light.py +++ b/homeassistant/components/rflink/light.py @@ -162,8 +162,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= class RflinkLight(SwitchableRflinkDevice, Light): """Representation of a Rflink light.""" - pass - class DimmableRflinkLight(SwitchableRflinkDevice, Light): """Rflink light device that support dimming.""" diff --git a/homeassistant/components/rflink/switch.py b/homeassistant/components/rflink/switch.py index 943f8a6aae61158c26510697bfa4acbe1746e60b..83c335f0f03f05e4ef1928bcdb362800224e3c00 100644 --- a/homeassistant/components/rflink/switch.py +++ b/homeassistant/components/rflink/switch.py @@ -71,5 +71,3 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= class RflinkSwitch(SwitchableRflinkDevice, SwitchDevice): """Representation of a Rflink switch.""" - - pass diff --git a/homeassistant/components/roku/media_player.py b/homeassistant/components/roku/media_player.py index e26cce46ee242c3278995b1941c9180fda7e703d..99cda9cb4119ca8e69fdb5e24c0082eda89d5841 100644 --- a/homeassistant/components/roku/media_player.py +++ b/homeassistant/components/roku/media_player.py @@ -68,7 +68,6 @@ class RokuDevice(MediaPlayerDevice): self._available = True except (RequestsConnectionError, RequestsReadTimeout, RokuException): self._available = False - pass def get_source_list(self): """Get the list of applications to be used as sources.""" diff --git a/homeassistant/components/roku/remote.py b/homeassistant/components/roku/remote.py index 548282d6b2fb62849aa94e08b1526c9dde70f9dd..999747c9a27ed2583ee974d1fd3b03a6252d788b 100644 --- a/homeassistant/components/roku/remote.py +++ b/homeassistant/components/roku/remote.py @@ -43,7 +43,6 @@ class RokuRemote(RemoteDevice): self._available = True except (RequestsConnectionError, RequestsReadTimeout, RokuException): self._available = False - pass @property def name(self): diff --git a/homeassistant/components/samsungtv/media_player.py b/homeassistant/components/samsungtv/media_player.py index 8f12341ee4aa06d4bc558024b666b54bced34d4e..35a374688b56ebe8c80dfa3a8ee130bfaaecab51 100644 --- a/homeassistant/components/samsungtv/media_player.py +++ b/homeassistant/components/samsungtv/media_player.py @@ -52,13 +52,6 @@ SUPPORT_SAMSUNGTV = ( ) -async def async_setup_platform( - hass, config, add_entities, discovery_info=None -): # pragma: no cover - """Set up the Samsung TV platform.""" - pass - - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up the Samsung TV from a config entry.""" ip_address = config_entry.data[CONF_IP_ADDRESS] diff --git a/homeassistant/components/simplisafe/__init__.py b/homeassistant/components/simplisafe/__init__.py index bf12951e2ae75ff641245ab9fd19914f736b63a7..04c00171b4372cfe0687ef86e01146c11834d80d 100644 --- a/homeassistant/components/simplisafe/__init__.py +++ b/homeassistant/components/simplisafe/__init__.py @@ -683,7 +683,6 @@ class SimpliSafeEntity(Entity): @callback def async_update_from_rest_api(self): """Update the entity with the provided REST API data.""" - pass @callback def _async_internal_update_from_websocket_event(self, event): @@ -707,7 +706,6 @@ class SimpliSafeEntity(Entity): @callback def async_update_from_websocket_event(self, event): """Update the entity with the provided websocket API data.""" - pass async def async_will_remove_from_hass(self) -> None: """Disconnect dispatcher listener when removed.""" diff --git a/homeassistant/components/smhi/weather.py b/homeassistant/components/smhi/weather.py index 574b8d8576725c5a1ed4a301d85b369d77c55058..0c5450b5ddd691ce67029e43a2e38dfebe116b05 100644 --- a/homeassistant/components/smhi/weather.py +++ b/homeassistant/components/smhi/weather.py @@ -51,15 +51,6 @@ RETRY_TIMEOUT = 5 * 60 MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=31) -async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): - """Old way of setting up components. - - Can only be called when a user accidentally mentions smhi in the - config. In that case it will be ignored. - """ - pass - - async def async_setup_entry( hass: HomeAssistant, config_entry: ConfigEntry, config_entries ) -> bool: diff --git a/homeassistant/components/soma/cover.py b/homeassistant/components/soma/cover.py index d23cc9ec5d0d3ca057c956063ccea44e9f9e08c7..9bfe903e7244e4273040b40c442b4f25861d9d8f 100644 --- a/homeassistant/components/soma/cover.py +++ b/homeassistant/components/soma/cover.py @@ -18,15 +18,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities): ) -async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): - """Old way of setting up platform. - - Can only be called when a user accidentally mentions the platform in their - config. But even in that case it would have been ignored. - """ - pass - - class SomaCover(SomaEntity, CoverDevice): """Representation of a Soma cover device.""" diff --git a/homeassistant/components/starline/account.py b/homeassistant/components/starline/account.py index 8d0214d1b5c4ffc19c0a45a7b84c3f9434ff8dfe..3ee716ec85678d1a55c71f4ba9a7b5ee39f735c5 100644 --- a/homeassistant/components/starline/account.py +++ b/homeassistant/components/starline/account.py @@ -61,7 +61,6 @@ class StarlineAccount: ) except Exception as err: # pylint: disable=broad-except LOGGER.error("Error updating SLNet token: %s", err) - pass def _update_data(self): """Update StarLine data.""" diff --git a/homeassistant/components/tellduslive/binary_sensor.py b/homeassistant/components/tellduslive/binary_sensor.py index ef1cd52f75b24b9613bcadfa590cdb14beeb8929..09541a120fd48614c3d7adc9a5c6b52d1bab6a54 100644 --- a/homeassistant/components/tellduslive/binary_sensor.py +++ b/homeassistant/components/tellduslive/binary_sensor.py @@ -10,15 +10,6 @@ from .entry import TelldusLiveEntity _LOGGER = logging.getLogger(__name__) -async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): - """Old way of setting up TelldusLive. - - Can only be called when a user accidentally mentions the platform in their - config. But even in that case it would have been ignored. - """ - pass - - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up tellduslive sensors dynamically.""" diff --git a/homeassistant/components/tellduslive/cover.py b/homeassistant/components/tellduslive/cover.py index 230f89b05318c19fc1604b92c7ffb9917770dc1f..6e31cd595bf6fc826be8bc1672e370058c91eaf1 100644 --- a/homeassistant/components/tellduslive/cover.py +++ b/homeassistant/components/tellduslive/cover.py @@ -10,15 +10,6 @@ from .entry import TelldusLiveEntity _LOGGER = logging.getLogger(__name__) -async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): - """Old way of setting up TelldusLive. - - Can only be called when a user accidentally mentions the platform in their - config. But even in that case it would have been ignored. - """ - pass - - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up tellduslive sensors dynamically.""" diff --git a/homeassistant/components/tellduslive/light.py b/homeassistant/components/tellduslive/light.py index c4921e3855e5fddf514066817ce1d1cf1d5ebb3d..3087c4cdf08920466799aa7fba7a0ff1210fced3 100644 --- a/homeassistant/components/tellduslive/light.py +++ b/homeassistant/components/tellduslive/light.py @@ -10,15 +10,6 @@ from .entry import TelldusLiveEntity _LOGGER = logging.getLogger(__name__) -async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): - """Old way of setting up TelldusLive. - - Can only be called when a user accidentally mentions the platform in their - config. But even in that case it would have been ignored. - """ - pass - - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up tellduslive sensors dynamically.""" diff --git a/homeassistant/components/tellduslive/sensor.py b/homeassistant/components/tellduslive/sensor.py index 11411e1d6ea93c205aeb0bf4aba79d9c982f672b..472c430da163090b64a370ecc9bfbdab801efc19 100644 --- a/homeassistant/components/tellduslive/sensor.py +++ b/homeassistant/components/tellduslive/sensor.py @@ -52,15 +52,6 @@ SENSOR_TYPES = { } -async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): - """Old way of setting up TelldusLive. - - Can only be called when a user accidentally mentions the platform in their - config. But even in that case it would have been ignored. - """ - pass - - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up tellduslive sensors dynamically.""" diff --git a/homeassistant/components/tellduslive/switch.py b/homeassistant/components/tellduslive/switch.py index 20c5fba7f9f244750b70d48bd46653755a634b3f..05a3c166213a79fbecbfc16194ef700d630ad544 100644 --- a/homeassistant/components/tellduslive/switch.py +++ b/homeassistant/components/tellduslive/switch.py @@ -10,15 +10,6 @@ from .entry import TelldusLiveEntity _LOGGER = logging.getLogger(__name__) -async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): - """Old way of setting up TelldusLive. - - Can only be called when a user accidentally mentions the platform in their - config. But even in that case it would have been ignored. - """ - pass - - async def async_setup_entry(hass, config_entry, async_add_entities): """Set up tellduslive sensors dynamically.""" diff --git a/homeassistant/components/tellstick/cover.py b/homeassistant/components/tellstick/cover.py index 87571baa2c96c9354af89c60d7bae9cc3a608470..0a5643fc1ea938b5f8fd26d86663146e5a5a46f7 100644 --- a/homeassistant/components/tellstick/cover.py +++ b/homeassistant/components/tellstick/cover.py @@ -55,12 +55,9 @@ class TellstickCover(TellstickDevice, CoverDevice): def _parse_tellcore_data(self, tellcore_data): """Turn the value received from tellcore into something useful.""" - pass def _parse_ha_data(self, kwargs): """Turn the value from HA into something useful.""" - pass def _update_model(self, new_state, data): """Update the device entity state to match the arguments.""" - pass diff --git a/homeassistant/components/tellstick/switch.py b/homeassistant/components/tellstick/switch.py index e16f9983d007c799faaecb2c83dc5c46a6e296f6..8797e8e61e6e8381392329f57e436d97af75d2da 100644 --- a/homeassistant/components/tellstick/switch.py +++ b/homeassistant/components/tellstick/switch.py @@ -34,11 +34,9 @@ class TellstickSwitch(TellstickDevice, ToggleEntity): def _parse_ha_data(self, kwargs): """Turn the value from HA into something useful.""" - pass def _parse_tellcore_data(self, tellcore_data): """Turn the value received from tellcore into something useful.""" - pass def _update_model(self, new_state, data): """Update the device entity state to match the arguments.""" diff --git a/homeassistant/components/tesla/__init__.py b/homeassistant/components/tesla/__init__.py index 2d08b48e0af19166b871ec3ea4e0d15f00bb7907..d2b5f0910213dd2075703b714633118b1d873b3c 100644 --- a/homeassistant/components/tesla/__init__.py +++ b/homeassistant/components/tesla/__init__.py @@ -250,11 +250,9 @@ class TeslaDevice(Entity): async def async_added_to_hass(self): """Register state update callback.""" - pass async def async_will_remove_from_hass(self): """Prepare for unload.""" - pass async def async_update(self): """Update the state of the device.""" diff --git a/homeassistant/components/toon/binary_sensor.py b/homeassistant/components/toon/binary_sensor.py index 7cf52919efed1cd5caa6a67048db043204a73542..e6ef780ec8ef421303ce57f7e3f06f00775e67a8 100644 --- a/homeassistant/components/toon/binary_sensor.py +++ b/homeassistant/components/toon/binary_sensor.py @@ -177,16 +177,10 @@ class ToonBinarySensor(ToonEntity, BinarySensorDevice): class ToonBoilerBinarySensor(ToonBinarySensor, ToonBoilerDeviceEntity): """Defines a Boiler binary sensor.""" - pass - class ToonDisplayBinarySensor(ToonBinarySensor, ToonDisplayDeviceEntity): """Defines a Toon Display binary sensor.""" - pass - class ToonBoilerModuleBinarySensor(ToonBinarySensor, ToonBoilerModuleDeviceEntity): """Defines a Boiler module binary sensor.""" - - pass diff --git a/homeassistant/components/toon/climate.py b/homeassistant/components/toon/climate.py index 9ce9991c37143f23117706cb106e320c9ad67b38..fac9cf4ffc2108aac18579811ac86b5e998a26bc 100644 --- a/homeassistant/components/toon/climate.py +++ b/homeassistant/components/toon/climate.py @@ -142,7 +142,6 @@ class ToonThermostatDevice(ToonDisplayDeviceEntity, ClimateDevice): def set_hvac_mode(self, hvac_mode: str) -> None: """Set new target hvac mode.""" - pass def update(self) -> None: """Update local state.""" diff --git a/homeassistant/components/toon/sensor.py b/homeassistant/components/toon/sensor.py index a5e88bb3d2faf318cc72c7d9de0c9f068de97a20..157c357e180ca736596cb00079925a2147f85ae9 100644 --- a/homeassistant/components/toon/sensor.py +++ b/homeassistant/components/toon/sensor.py @@ -283,22 +283,14 @@ class ToonSensor(ToonEntity): class ToonElectricityMeterDeviceSensor(ToonSensor, ToonElectricityMeterDeviceEntity): """Defines a Electricity Meter sensor.""" - pass - class ToonGasMeterDeviceSensor(ToonSensor, ToonGasMeterDeviceEntity): """Defines a Gas Meter sensor.""" - pass - class ToonSolarDeviceSensor(ToonSensor, ToonSolarDeviceEntity): """Defines a Solar sensor.""" - pass - class ToonBoilerDeviceSensor(ToonSensor, ToonBoilerDeviceEntity): """Defines a Boiler sensor.""" - - pass diff --git a/homeassistant/components/vacuum/__init__.py b/homeassistant/components/vacuum/__init__.py index 3cd2de600e31573cc309167a0f21cc455bc59bd9..f66a1b5f226cce90051b524627482fdb6e815450 100644 --- a/homeassistant/components/vacuum/__init__.py +++ b/homeassistant/components/vacuum/__init__.py @@ -304,11 +304,9 @@ class VacuumDevice(_BaseVacuum, ToggleEntity): async def async_pause(self): """Not supported.""" - pass async def async_start(self): """Not supported.""" - pass class StateVacuumDevice(_BaseVacuum): @@ -373,12 +371,9 @@ class StateVacuumDevice(_BaseVacuum): async def async_turn_on(self, **kwargs): """Not supported.""" - pass async def async_turn_off(self, **kwargs): """Not supported.""" - pass async def async_toggle(self, **kwargs): """Not supported.""" - pass diff --git a/homeassistant/components/velbus/climate.py b/homeassistant/components/velbus/climate.py index e322cfb77c7bc8b95dc87e9e67a620cd8a7e2816..38d893e73434fa8a2d5aad2253230f138714ebee 100644 --- a/homeassistant/components/velbus/climate.py +++ b/homeassistant/components/velbus/climate.py @@ -82,4 +82,3 @@ class VelbusClimate(VelbusEntity, ClimateDevice): def set_hvac_mode(self, hvac_mode): """Set new target hvac mode.""" - pass diff --git a/homeassistant/components/websocket_api/error.py b/homeassistant/components/websocket_api/error.py index c0b7ea0455471f84e89f0b25c3098d55035e1068..5d4ca93105df88536137c720970ab75685741e21 100644 --- a/homeassistant/components/websocket_api/error.py +++ b/homeassistant/components/websocket_api/error.py @@ -4,5 +4,3 @@ from homeassistant.exceptions import HomeAssistantError class Disconnect(HomeAssistantError): """Disconnect the current session.""" - - pass diff --git a/homeassistant/components/withings/common.py b/homeassistant/components/withings/common.py index 3a9d1d5275188a2c753cbb95055f5b1051e8ea5d..ac7bc149cd9268e354c6f2b9b82d615f7b68ff7a 100644 --- a/homeassistant/components/withings/common.py +++ b/homeassistant/components/withings/common.py @@ -38,14 +38,10 @@ NOT_AUTHENTICATED_ERROR = re.compile( class NotAuthenticatedError(HomeAssistantError): """Raise when not authenticated with the service.""" - pass - class ServiceError(HomeAssistantError): """Raise when the service has an error.""" - pass - class ThrottleData: """Throttle data.""" diff --git a/homeassistant/components/xs1/climate.py b/homeassistant/components/xs1/climate.py index 33c778c0d3df2d6bc326d3137799cc53fc780d55..19d5ae1e904e96ee3f0d20438bacb4af83b51c88 100644 --- a/homeassistant/components/xs1/climate.py +++ b/homeassistant/components/xs1/climate.py @@ -115,7 +115,6 @@ class XS1ThermostatEntity(XS1DeviceEntity, ClimateDevice): def set_hvac_mode(self, hvac_mode): """Set new target hvac mode.""" - pass async def async_update(self): """Also update the sensor when available.""" diff --git a/homeassistant/components/yessssms/notify.py b/homeassistant/components/yessssms/notify.py index fbc6b50e8d6072c172dc0559a674e02c09c9302c..863602134a44f0c174cac48c8477e36ebc7a7cf7 100644 --- a/homeassistant/components/yessssms/notify.py +++ b/homeassistant/components/yessssms/notify.py @@ -46,7 +46,6 @@ def get_service(hass, config, discovery_info=None): "Connection Error, could not verify login data for '%s'", yesss.get_provider(), ) - pass _LOGGER.debug( "initialized; library version: %s, with %s", diff --git a/homeassistant/components/zha/binary_sensor.py b/homeassistant/components/zha/binary_sensor.py index 9ed1bbfca16120fd3b2e45a5403f651a09f25e88..044d32890da2c6e2bb74bf684bfc41518d85baae 100644 --- a/homeassistant/components/zha/binary_sensor.py +++ b/homeassistant/components/zha/binary_sensor.py @@ -75,7 +75,6 @@ class BinarySensor(ZhaEntity, BinarySensorDevice): async def get_device_class(self): """Get the HA device class from the channel.""" - pass async def async_added_to_hass(self): """Run when about to be added to hass.""" diff --git a/homeassistant/components/zha/core/channels/base.py b/homeassistant/components/zha/core/channels/base.py index a5255e7f756d5b045d91a67cc80bfb196293e9a3..8478c2b9c49113f83b791335a7a9ad14f1112cb2 100644 --- a/homeassistant/components/zha/core/channels/base.py +++ b/homeassistant/components/zha/core/channels/base.py @@ -205,7 +205,6 @@ class ZigbeeChannel(LogMixin): @callback def cluster_command(self, tsn, command_id, args): """Handle commands received to this cluster.""" - pass @callback def attribute_updated(self, attrid, value): @@ -220,7 +219,6 @@ class ZigbeeChannel(LogMixin): @callback def zdo_command(self, *args, **kwargs): """Handle ZDO commands on this cluster.""" - pass @callback def zha_send_event(self, command: str, args: Union[int, dict]) -> None: @@ -236,7 +234,6 @@ class ZigbeeChannel(LogMixin): async def async_update(self): """Retrieve latest state from cluster.""" - pass async def get_attribute_value(self, attribute, from_cache=True): """Get the value for an attribute.""" @@ -322,12 +319,10 @@ class ZDOChannel(LogMixin): @callback def device_announce(self, zigpy_device): """Device announce handler.""" - pass @callback def permit_duration(self, duration): """Permit handler.""" - pass async def async_initialize(self, from_cache): """Initialize channel.""" diff --git a/homeassistant/components/zha/core/channels/closures.py b/homeassistant/components/zha/core/channels/closures.py index 2b6c06ba12a00af076f13d803d7ef805c0687968..826c99fbd3b2ff62cf87a708a014548fc27ac0ca 100644 --- a/homeassistant/components/zha/core/channels/closures.py +++ b/homeassistant/components/zha/core/channels/closures.py @@ -49,8 +49,6 @@ class DoorLockChannel(ZigbeeChannel): class Shade(ZigbeeChannel): """Shade channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(closures.WindowCovering.cluster_id) class WindowCovering(ZigbeeChannel): diff --git a/homeassistant/components/zha/core/channels/general.py b/homeassistant/components/zha/core/channels/general.py index f2afadbd657c818b3cd8b7331ae2b8fa5b3e5e33..05406b6939eadf1e90a3fcb7702a59fa9871c36a 100644 --- a/homeassistant/components/zha/core/channels/general.py +++ b/homeassistant/components/zha/core/channels/general.py @@ -30,8 +30,6 @@ _LOGGER = logging.getLogger(__name__) class Alarms(ZigbeeChannel): """Alarms channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.AnalogInput.cluster_id) class AnalogInput(ZigbeeChannel): @@ -58,8 +56,6 @@ class AnalogValue(ZigbeeChannel): class ApplianceContorl(ZigbeeChannel): """Appliance Control channel.""" - pass - @registries.CHANNEL_ONLY_CLUSTERS.register(general.Basic.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Basic.cluster_id) @@ -130,29 +126,21 @@ class BinaryValue(ZigbeeChannel): class Commissioning(ZigbeeChannel): """Commissioning channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.DeviceTemperature.cluster_id) class DeviceTemperature(ZigbeeChannel): """Device Temperature channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.GreenPowerProxy.cluster_id) class GreenPowerProxy(ZigbeeChannel): """Green Power Proxy channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Groups.cluster_id) class Groups(ZigbeeChannel): """Groups channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Identify.cluster_id) class Identify(ZigbeeChannel): @@ -171,8 +159,6 @@ class Identify(ZigbeeChannel): class LevelControlClientChannel(ClientChannel): """LevelControl client cluster.""" - pass - @registries.BINDABLE_CLUSTERS.register(general.LevelControl.cluster_id) @registries.LIGHT_CLUSTERS.register(general.LevelControl.cluster_id) @@ -244,8 +230,6 @@ class MultistateValue(ZigbeeChannel): class OnOffClientChannel(ClientChannel): """OnOff client channel.""" - pass - @registries.BINARY_SENSOR_CLUSTERS.register(general.OnOff.cluster_id) @registries.BINDABLE_CLUSTERS.register(general.OnOff.cluster_id) @@ -331,8 +315,6 @@ class OnOffChannel(ZigbeeChannel): class OnOffConfiguration(ZigbeeChannel): """OnOff Configuration channel.""" - pass - @registries.CLIENT_CHANNELS_REGISTRY.register(general.Ota.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Ota.cluster_id) @@ -354,8 +336,6 @@ class Ota(ZigbeeChannel): class Partition(ZigbeeChannel): """Partition channel.""" - pass - @registries.CHANNEL_ONLY_CLUSTERS.register(general.PollControl.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.PollControl.cluster_id) @@ -449,32 +429,22 @@ class PowerConfigurationChannel(ZigbeeChannel): class PowerProfile(ZigbeeChannel): """Power Profile channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.RSSILocation.cluster_id) class RSSILocation(ZigbeeChannel): """RSSI Location channel.""" - pass - @registries.CLIENT_CHANNELS_REGISTRY.register(general.Scenes.cluster_id) class ScenesClientChannel(ClientChannel): """Scenes channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Scenes.cluster_id) class Scenes(ZigbeeChannel): """Scenes channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Time.cluster_id) class Time(ZigbeeChannel): """Time channel.""" - - pass diff --git a/homeassistant/components/zha/core/channels/homeautomation.py b/homeassistant/components/zha/core/channels/homeautomation.py index 1df7cf117e291aafea61a64b69d411e0dab972cd..c867fdc621d1578c5e5db6aefbcdd94d9c62fc3d 100644 --- a/homeassistant/components/zha/core/channels/homeautomation.py +++ b/homeassistant/components/zha/core/channels/homeautomation.py @@ -21,8 +21,6 @@ _LOGGER = logging.getLogger(__name__) class ApplianceEventAlerts(ZigbeeChannel): """Appliance Event Alerts channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( homeautomation.ApplianceIdentification.cluster_id @@ -30,8 +28,6 @@ class ApplianceEventAlerts(ZigbeeChannel): class ApplianceIdentification(ZigbeeChannel): """Appliance Identification channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( homeautomation.ApplianceStatistics.cluster_id @@ -39,15 +35,11 @@ class ApplianceIdentification(ZigbeeChannel): class ApplianceStatistics(ZigbeeChannel): """Appliance Statistics channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(homeautomation.Diagnostic.cluster_id) class Diagnostic(ZigbeeChannel): """Diagnostic channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( homeautomation.ElectricalMeasurement.cluster_id @@ -127,5 +119,3 @@ class ElectricalMeasurementChannel(ZigbeeChannel): ) class MeterIdentification(ZigbeeChannel): """Metering Identification channel.""" - - pass diff --git a/homeassistant/components/zha/core/channels/hvac.py b/homeassistant/components/zha/core/channels/hvac.py index 3c00e186ebb265bf027198a34595422cb6083de1..bd90b907d3b6c48b0ff9d8df6538e5e57013e7d2 100644 --- a/homeassistant/components/zha/core/channels/hvac.py +++ b/homeassistant/components/zha/core/channels/hvac.py @@ -17,8 +17,6 @@ _LOGGER = logging.getLogger(__name__) class Dehumidification(ZigbeeChannel): """Dehumidification channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(hvac.Fan.cluster_id) class FanChannel(ZigbeeChannel): @@ -67,18 +65,12 @@ class FanChannel(ZigbeeChannel): class Pump(ZigbeeChannel): """Pump channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(hvac.Thermostat.cluster_id) class Thermostat(ZigbeeChannel): """Thermostat channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(hvac.UserInterface.cluster_id) class UserInterface(ZigbeeChannel): """User interface (thermostat) channel.""" - - pass diff --git a/homeassistant/components/zha/core/channels/lighting.py b/homeassistant/components/zha/core/channels/lighting.py index 25f6c05d739ac67a76cc7a57b7d50d28b4f7bc0e..9721bee90146e3f896a87673938bfb269228db08 100644 --- a/homeassistant/components/zha/core/channels/lighting.py +++ b/homeassistant/components/zha/core/channels/lighting.py @@ -14,15 +14,11 @@ _LOGGER = logging.getLogger(__name__) class Ballast(ZigbeeChannel): """Ballast channel.""" - pass - @registries.CLIENT_CHANNELS_REGISTRY.register(lighting.Color.cluster_id) class ColorClientChannel(ClientChannel): """Color client channel.""" - pass - @registries.BINDABLE_CLUSTERS.register(lighting.Color.cluster_id) @registries.LIGHT_CLUSTERS.register(lighting.Color.cluster_id) diff --git a/homeassistant/components/zha/core/channels/lightlink.py b/homeassistant/components/zha/core/channels/lightlink.py index af0248c9713c5ffd61e0252e22f6162d5d62c87c..25f3ebf96867b49b2226be467e8fe03d5c73c04b 100644 --- a/homeassistant/components/zha/core/channels/lightlink.py +++ b/homeassistant/components/zha/core/channels/lightlink.py @@ -13,5 +13,3 @@ _LOGGER = logging.getLogger(__name__) @registries.ZIGBEE_CHANNEL_REGISTRY.register(lightlink.LightLink.cluster_id) class LightLink(ZigbeeChannel): """Lightlink channel.""" - - pass diff --git a/homeassistant/components/zha/core/channels/protocol.py b/homeassistant/components/zha/core/channels/protocol.py index db7488e9a7f87a7b9182dbedc629735c62eebad0..083e0f55841e361759ace45a49643b7aff4ee9c3 100644 --- a/homeassistant/components/zha/core/channels/protocol.py +++ b/homeassistant/components/zha/core/channels/protocol.py @@ -13,99 +13,71 @@ _LOGGER = logging.getLogger(__name__) class AnalogInputExtended(ZigbeeChannel): """Analog Input Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogInputRegular.cluster_id) class AnalogInputRegular(ZigbeeChannel): """Analog Input Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogOutputExtended.cluster_id) class AnalogOutputExtended(ZigbeeChannel): """Analog Output Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogOutputRegular.cluster_id) class AnalogOutputRegular(ZigbeeChannel): """Analog Output Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogValueExtended.cluster_id) class AnalogValueExtended(ZigbeeChannel): """Analog Value Extended edition channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogValueRegular.cluster_id) class AnalogValueRegular(ZigbeeChannel): """Analog Value Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BacnetProtocolTunnel.cluster_id) class BacnetProtocolTunnel(ZigbeeChannel): """Bacnet Protocol Tunnel channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryInputExtended.cluster_id) class BinaryInputExtended(ZigbeeChannel): """Binary Input Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryInputRegular.cluster_id) class BinaryInputRegular(ZigbeeChannel): """Binary Input Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryOutputExtended.cluster_id) class BinaryOutputExtended(ZigbeeChannel): """Binary Output Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryOutputRegular.cluster_id) class BinaryOutputRegular(ZigbeeChannel): """Binary Output Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryValueExtended.cluster_id) class BinaryValueExtended(ZigbeeChannel): """Binary Value Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryValueRegular.cluster_id) class BinaryValueRegular(ZigbeeChannel): """Binary Value Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.GenericTunnel.cluster_id) class GenericTunnel(ZigbeeChannel): """Generic Tunnel channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( protocol.MultistateInputExtended.cluster_id @@ -113,15 +85,11 @@ class GenericTunnel(ZigbeeChannel): class MultiStateInputExtended(ZigbeeChannel): """Multistate Input Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.MultistateInputRegular.cluster_id) class MultiStateInputRegular(ZigbeeChannel): """Multistate Input Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( protocol.MultistateOutputExtended.cluster_id @@ -129,8 +97,6 @@ class MultiStateInputRegular(ZigbeeChannel): class MultiStateOutputExtended(ZigbeeChannel): """Multistate Output Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( protocol.MultistateOutputRegular.cluster_id @@ -138,8 +104,6 @@ class MultiStateOutputExtended(ZigbeeChannel): class MultiStateOutputRegular(ZigbeeChannel): """Multistate Output Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( protocol.MultistateValueExtended.cluster_id @@ -147,11 +111,7 @@ class MultiStateOutputRegular(ZigbeeChannel): class MultiStateValueExtended(ZigbeeChannel): """Multistate Value Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.MultistateValueRegular.cluster_id) class MultiStateValueRegular(ZigbeeChannel): """Multistate Value Regular channel.""" - - pass diff --git a/homeassistant/components/zha/core/channels/security.py b/homeassistant/components/zha/core/channels/security.py index 822ae8dd911d46c6a11b4e5f952b7d7289352ab4..914c11331162f5a06dc61780a56c78a02f01884b 100644 --- a/homeassistant/components/zha/core/channels/security.py +++ b/homeassistant/components/zha/core/channels/security.py @@ -30,8 +30,6 @@ _LOGGER = logging.getLogger(__name__) class IasAce(ZigbeeChannel): """IAS Ancillary Control Equipment channel.""" - pass - @registries.CHANNEL_ONLY_CLUSTERS.register(security.IasWd.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(security.IasWd.cluster_id) diff --git a/homeassistant/components/zha/core/channels/smartenergy.py b/homeassistant/components/zha/core/channels/smartenergy.py index 86533662838d63e5923af3c1ddacb673813c3db2..4226aad3f0a5822802a20e0ebe7068e3e55cb4a9 100644 --- a/homeassistant/components/zha/core/channels/smartenergy.py +++ b/homeassistant/components/zha/core/channels/smartenergy.py @@ -17,57 +17,41 @@ _LOGGER = logging.getLogger(__name__) class Calendar(ZigbeeChannel): """Calendar channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.DeviceManagement.cluster_id) class DeviceManagement(ZigbeeChannel): """Device Management channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Drlc.cluster_id) class Drlc(ZigbeeChannel): """Demand Response and Load Control channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.EnergyManagement.cluster_id) class EnergyManagement(ZigbeeChannel): """Energy Management channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Events.cluster_id) class Events(ZigbeeChannel): """Event channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.KeyEstablishment.cluster_id) class KeyEstablishment(ZigbeeChannel): """Key Establishment channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.MduPairing.cluster_id) class MduPairing(ZigbeeChannel): """Pairing channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Messaging.cluster_id) class Messaging(ZigbeeChannel): """Messaging channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Metering.cluster_id) class Metering(ZigbeeChannel): @@ -163,18 +147,12 @@ class Metering(ZigbeeChannel): class Prepayment(ZigbeeChannel): """Prepayment channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Price.cluster_id) class Price(ZigbeeChannel): """Price channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Tunneling.cluster_id) class Tunneling(ZigbeeChannel): """Tunneling channel.""" - - pass diff --git a/homeassistant/components/zha/entity.py b/homeassistant/components/zha/entity.py index 2d098d60bfb5d1692bac2e74f21d811cab780435..0ba7ff09f3f139888f796e6e87ed2dd1c334d2c2 100644 --- a/homeassistant/components/zha/entity.py +++ b/homeassistant/components/zha/entity.py @@ -112,7 +112,6 @@ class BaseZhaEntity(RestoreEntity, LogMixin, entity.Entity): @callback def async_set_state(self, attr_id: int, attr_name: str, value: Any) -> None: """Set the entity state.""" - pass async def async_added_to_hass(self) -> None: """Run when about to be added to hass.""" @@ -136,7 +135,6 @@ class BaseZhaEntity(RestoreEntity, LogMixin, entity.Entity): @callback def async_restore_last_state(self, last_state) -> None: """Restore previous state.""" - pass async def async_accept_signal( self, channel: ChannelType, signal: str, func: CALLABLE_T, signal_override=False @@ -282,4 +280,3 @@ class ZhaGroupEntity(BaseZhaEntity): async def async_update(self) -> None: """Update the state of the group entity.""" - pass diff --git a/homeassistant/components/zha/fan.py b/homeassistant/components/zha/fan.py index c3cd88b0d6d04f8fc3a55628d40f242367f466e2..8a9dc2691fc90ecba6c3a2e261b87e545cad0049 100644 --- a/homeassistant/components/zha/fan.py +++ b/homeassistant/components/zha/fan.py @@ -121,7 +121,6 @@ class BaseFan(FanEntity): @callback def async_set_state(self, attr_id, attr_name, value): """Handle state update from channel.""" - pass @STRICT_MATCH(channel_names=CHANNEL_FAN) diff --git a/homeassistant/components/zha/sensor.py b/homeassistant/components/zha/sensor.py index 5e2e8bf4a0d360ece76984729710c822d4d39b7c..4544780b4f86e3d18fda7f5d8a40d92fd37c45c9 100644 --- a/homeassistant/components/zha/sensor.py +++ b/homeassistant/components/zha/sensor.py @@ -158,7 +158,6 @@ class AnalogInput(Sensor): """Sensor that displays analog input values.""" SENSOR_ATTR = "present_value" - pass @STRICT_MATCH(channel_names=CHANNEL_POWER_CONFIGURATION) diff --git a/homeassistant/components/zigbee/binary_sensor.py b/homeassistant/components/zigbee/binary_sensor.py index d8a5949be4c3b5ef8b9341a27ab1c98728322f57..8b37107b906e640d0977051f3a252c7a4efae38d 100644 --- a/homeassistant/components/zigbee/binary_sensor.py +++ b/homeassistant/components/zigbee/binary_sensor.py @@ -20,5 +20,3 @@ def setup_platform(hass, config, add_entities, discovery_info=None): class ZigBeeBinarySensor(ZigBeeDigitalIn, BinarySensorDevice): """Use ZigBeeDigitalIn as binary sensor.""" - - pass diff --git a/homeassistant/components/zigbee/light.py b/homeassistant/components/zigbee/light.py index 9a48efe8a95436945cb631de8bfefbd21fc8b9b7..86994a55446c0802d6174437caa1bb857888f5bc 100644 --- a/homeassistant/components/zigbee/light.py +++ b/homeassistant/components/zigbee/light.py @@ -22,5 +22,3 @@ def setup_platform(hass, config, add_entities, discovery_info=None): class ZigBeeLight(ZigBeeDigitalOut, Light): """Use ZigBeeDigitalOut as light.""" - - pass diff --git a/homeassistant/components/zigbee/switch.py b/homeassistant/components/zigbee/switch.py index 4e8d21f438a12eb2306767b34e3f01f808bb804f..71e419e410f102c57df6ce91cd0e69bd6be355a3 100644 --- a/homeassistant/components/zigbee/switch.py +++ b/homeassistant/components/zigbee/switch.py @@ -21,5 +21,3 @@ def setup_platform(hass, config, add_entities, discovery_info=None): class ZigBeeSwitch(ZigBeeDigitalOut, SwitchDevice): """Representation of a Zigbee Digital Out device.""" - - pass diff --git a/homeassistant/components/zwave/__init__.py b/homeassistant/components/zwave/__init__.py index 4e3f2e9af571b12427b752cbbedd24558dd60358..9beef00a9217fd019f8837c4bcf18d4758304ff5 100644 --- a/homeassistant/components/zwave/__init__.py +++ b/homeassistant/components/zwave/__init__.py @@ -1209,7 +1209,6 @@ class ZWaveDeviceEntity(ZWaveBaseEntity): def value_added(self): """Handle a new value of this entity.""" - pass def value_changed(self): """Handle a changed value for this entity's node.""" @@ -1263,7 +1262,6 @@ class ZWaveDeviceEntity(ZWaveBaseEntity): def update_properties(self): """Update on data changes for node values.""" - pass @property def should_poll(self): diff --git a/homeassistant/components/zwave/sensor.py b/homeassistant/components/zwave/sensor.py index b732e3569eda4de6beeaa24ecbefdc5506698ee8..b551e436352674f19632a097cdb8fe4b2c1cbc8f 100644 --- a/homeassistant/components/zwave/sensor.py +++ b/homeassistant/components/zwave/sensor.py @@ -105,8 +105,6 @@ class ZWaveAlarmSensor(ZWaveSensor): COMMAND_CLASS_ALARM is what we get here. """ - pass - class ZWaveBatterySensor(ZWaveSensor): """Representation of Z-Wave device battery level.""" diff --git a/homeassistant/config.py b/homeassistant/config.py index 0ac86c4eb4b2f66c646c5bcc29647ab5e560fe46..068dbd47fa9667f71826ae4e3e4661acaa8b6fff 100644 --- a/homeassistant/config.py +++ b/homeassistant/config.py @@ -375,7 +375,6 @@ def process_ha_config_upgrade(hass: HomeAssistant) -> None: config_file.write(config_raw) except OSError: _LOGGER.exception("Migrating to google_translate tts failed") - pass if version_obj < LooseVersion("0.94") and is_docker_env(): # In 0.94 we no longer install packages inside the deps folder when diff --git a/homeassistant/data_entry_flow.py b/homeassistant/data_entry_flow.py index 4a115762be40b04fc530319cd6dc838932529d3c..0d419ae66c28ba49b4275d94319f347be33ca5d5 100644 --- a/homeassistant/data_entry_flow.py +++ b/homeassistant/data_entry_flow.py @@ -67,20 +67,17 @@ class FlowManager(abc.ABC): Handler key is the domain of the component that we want to set up. """ - pass @abc.abstractmethod async def async_finish_flow( self, flow: "FlowHandler", result: Dict[str, Any] ) -> Dict[str, Any]: """Finish a config flow and add an entry.""" - pass async def async_post_init( self, flow: "FlowHandler", result: Dict[str, Any] ) -> None: """Entry has finished executing its first step asynchronously.""" - pass @callback def async_progress(self) -> List[Dict]: diff --git a/homeassistant/util/logging.py b/homeassistant/util/logging.py index 1a46a34c1a899f8ef37c3398f75f137c84bf1b82..abadb61316895b4a6f754992d3e9907b74c08ffb 100644 --- a/homeassistant/util/logging.py +++ b/homeassistant/util/logging.py @@ -96,15 +96,12 @@ class AsyncHandler: def createLock(self) -> None: """Ignore lock stuff.""" - pass def acquire(self) -> None: """Ignore lock stuff.""" - pass def release(self) -> None: """Ignore lock stuff.""" - pass @property def level(self) -> int: diff --git a/homeassistant/util/yaml/objects.py b/homeassistant/util/yaml/objects.py index 183c6c171d681ff5a2bf78d7017afefcfc8e5c5b..cae957740e433c4c9f2eea7b7698f1b1451ead49 100644 --- a/homeassistant/util/yaml/objects.py +++ b/homeassistant/util/yaml/objects.py @@ -4,10 +4,6 @@ class NodeListClass(list): """Wrapper class to be able to add attributes on a list.""" - pass - class NodeStrClass(str): """Wrapper class to be able to add attributes on a string.""" - - pass diff --git a/pylintrc b/pylintrc index 1b08c40793adef5aaac6ffd526d4c5e03a1a27a5..38c9beb28e5012bfe8b451e992ed5b2d1d1af7c1 100644 --- a/pylintrc +++ b/pylintrc @@ -24,7 +24,6 @@ good-names=id,i,j,k,ex,Run,_,fp # too-few-* - same as too-many-* # abstract-method - with intro of async there are always methods missing # inconsistent-return-statements - doesn't handle raise -# unnecessary-pass - readability for functions which only contain pass # import-outside-toplevel - TODO # too-many-ancestors - it's too strict. # wrong-import-order - isort guards this @@ -49,7 +48,6 @@ disable= too-many-return-statements, too-many-statements, too-many-boolean-expressions, - unnecessary-pass, unused-argument, wrong-import-order enable= diff --git a/tests/components/smhi/test_weather.py b/tests/components/smhi/test_weather.py index 952e82c01be2d52ffa734da8ad8d1577d688046a..3485a108d5b7244c3a133e58c4633cd0962e4328 100644 --- a/tests/components/smhi/test_weather.py +++ b/tests/components/smhi/test_weather.py @@ -74,11 +74,6 @@ async def test_setup_hass(hass: HomeAssistant, aioclient_mock) -> None: assert forecast[ATTR_FORECAST_CONDITION] == "partlycloudy" -async def test_setup_plattform(hass): - """Test that setup platform does nothing.""" - assert await weather_smhi.async_setup_platform(hass, None, None) is None - - def test_properties_no_data(hass: HomeAssistant) -> None: """Test properties when no API data available.""" weather = weather_smhi.SmhiWeather("name", "10", "10")