diff --git a/homeassistant/components/fitbit/sensor.py b/homeassistant/components/fitbit/sensor.py index 48b05482dec..3165843a23d 100644 --- a/homeassistant/components/fitbit/sensor.py +++ b/homeassistant/components/fitbit/sensor.py @@ -25,7 +25,7 @@ from homeassistant.const import ( CONF_CLIENT_SECRET, CONF_UNIT_SYSTEM, ) -from homeassistant.core import HomeAssistant, callback +from homeassistant.core import HomeAssistant import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.icon import icon_for_battery_level @@ -279,7 +279,6 @@ class FitbitAuthCallbackView(HomeAssistantView): self.add_entities = add_entities self.oauth = oauth - @callback async def get(self, request: Request) -> str: """Finish OAuth callback request.""" hass: HomeAssistant = request.app["hass"] diff --git a/homeassistant/components/fritz/common.py b/homeassistant/components/fritz/common.py index 4a01367cc20..d748bdcf7dd 100644 --- a/homeassistant/components/fritz/common.py +++ b/homeassistant/components/fritz/common.py @@ -240,7 +240,6 @@ class FritzBoxTools(update_coordinator.DataUpdateCoordinator): self.device_conn_type, "GetInfo" ).get("NewEnable") - @callback async def _async_update_data(self) -> None: """Update FritzboxTools data.""" try: diff --git a/homeassistant/components/generic_hygrostat/humidifier.py b/homeassistant/components/generic_hygrostat/humidifier.py index fa8b05b5ef8..8072c76ea07 100644 --- a/homeassistant/components/generic_hygrostat/humidifier.py +++ b/homeassistant/components/generic_hygrostat/humidifier.py @@ -173,7 +173,6 @@ class GenericHygrostat(HumidifierEntity, RestoreEntity): if self._keep_alive: async_track_time_interval(self.hass, self._async_operate, self._keep_alive) - @callback async def _async_startup(event): """Init on startup.""" sensor_state = self.hass.states.get(self._sensor_entity_id) @@ -309,7 +308,6 @@ class GenericHygrostat(HumidifierEntity, RestoreEntity): # Get default humidity from super class return super().max_humidity - @callback async def _async_sensor_changed(self, entity_id, old_state, new_state): """Handle ambient humidity changes.""" if new_state is None: @@ -328,7 +326,6 @@ class GenericHygrostat(HumidifierEntity, RestoreEntity): await self._async_operate() await self.async_update_ha_state() - @callback async def _async_sensor_not_responding(self, now=None): """Handle sensor stale event.""" diff --git a/homeassistant/components/group/__init__.py b/homeassistant/components/group/__init__.py index 943b15dd870..04bc109d15b 100644 --- a/homeassistant/components/group/__init__.py +++ b/homeassistant/components/group/__init__.py @@ -574,7 +574,6 @@ class Group(Entity): return group @staticmethod - @callback async def async_create_group( hass: HomeAssistant, name: str, diff --git a/homeassistant/components/motioneye/__init__.py b/homeassistant/components/motioneye/__init__.py index 462f5ef03d2..7c87dda1bd2 100644 --- a/homeassistant/components/motioneye/__init__.py +++ b/homeassistant/components/motioneye/__init__.py @@ -328,7 +328,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: hass, DOMAIN, "motionEye", entry.data[CONF_WEBHOOK_ID], handle_webhook ) - @callback async def async_update_data() -> dict[str, Any] | None: try: return await client.async_get_cameras() diff --git a/homeassistant/components/mqtt/client.py b/homeassistant/components/mqtt/client.py index 6e6f67e4e7a..81142fadb87 100644 --- a/homeassistant/components/mqtt/client.py +++ b/homeassistant/components/mqtt/client.py @@ -343,7 +343,6 @@ class MQTT: self.init_client() - @callback async def async_stop_mqtt(_event: Event): """Stop MQTT component.""" await self.async_disconnect() diff --git a/homeassistant/components/mqtt/tag.py b/homeassistant/components/mqtt/tag.py index 9452d5fc259..dc4cc0e109d 100644 --- a/homeassistant/components/mqtt/tag.py +++ b/homeassistant/components/mqtt/tag.py @@ -7,7 +7,7 @@ import voluptuous as vol from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_DEVICE, CONF_PLATFORM, CONF_VALUE_TEMPLATE -from homeassistant.core import HomeAssistant, callback +from homeassistant.core import HomeAssistant import homeassistant.helpers.config_validation as cv from homeassistant.helpers.typing import ConfigType @@ -128,7 +128,6 @@ class MQTTTagScanner(MqttDiscoveryDeviceUpdate): async def subscribe_topics(self) -> None: """Subscribe to MQTT topics.""" - @callback async def tag_scanned(msg: ReceiveMessage) -> None: tag_id = self._value_template(msg.payload, "").strip() if not tag_id: # No output from template, ignore diff --git a/homeassistant/components/network/network.py b/homeassistant/components/network/network.py index e9542ec2d54..0b90023bfd4 100644 --- a/homeassistant/components/network/network.py +++ b/homeassistant/components/network/network.py @@ -22,7 +22,6 @@ _LOGGER = logging.getLogger(__name__) @singleton(DATA_NETWORK) -@callback async def async_get_network(hass: HomeAssistant) -> Network: """Get network singleton.""" network = Network(hass) diff --git a/homeassistant/components/philips_js/__init__.py b/homeassistant/components/philips_js/__init__.py index 40e803e4b35..9e574e69f90 100644 --- a/homeassistant/components/philips_js/__init__.py +++ b/homeassistant/components/philips_js/__init__.py @@ -187,7 +187,6 @@ class PhilipsTVDataUpdateCoordinator(DataUpdateCoordinator[None]): super()._unschedule_refresh() self._async_notify_stop() - @callback async def _async_update_data(self): """Fetch the latest data from the source.""" try: diff --git a/homeassistant/components/switcher_kis/__init__.py b/homeassistant/components/switcher_kis/__init__.py index e0f328e9312..31273dce23d 100644 --- a/homeassistant/components/switcher_kis/__init__.py +++ b/homeassistant/components/switcher_kis/__init__.py @@ -106,7 +106,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: await async_start_bridge(hass, on_device_data_callback) - @callback async def stop_bridge(event: Event) -> None: await async_stop_bridge(hass) diff --git a/homeassistant/components/zwave_js/device_condition.py b/homeassistant/components/zwave_js/device_condition.py index 7775995437a..c42b5af71c4 100644 --- a/homeassistant/components/zwave_js/device_condition.py +++ b/homeassistant/components/zwave_js/device_condition.py @@ -196,7 +196,6 @@ def async_condition_from_config( raise HomeAssistantError(f"Unhandled condition type {condition_type}") -@callback async def async_get_condition_capabilities( hass: HomeAssistant, config: ConfigType ) -> dict[str, vol.Schema]: diff --git a/tests/components/logbook/test_websocket_api.py b/tests/components/logbook/test_websocket_api.py index 6c4908a2ad5..ec4f2183a9a 100644 --- a/tests/components/logbook/test_websocket_api.py +++ b/tests/components/logbook/test_websocket_api.py @@ -27,7 +27,7 @@ from homeassistant.const import ( STATE_OFF, STATE_ON, ) -from homeassistant.core import Event, HomeAssistant, State, callback +from homeassistant.core import Event, HomeAssistant, State from homeassistant.helpers import device_registry, entity_registry from homeassistant.helpers.entityfilter import CONF_ENTITY_GLOBS from homeassistant.setup import async_setup_component @@ -51,7 +51,6 @@ def set_utc(hass): hass.config.set_time_zone("UTC") -@callback async def _async_mock_logbook_platform(hass: HomeAssistant) -> None: class MockLogbookPlatform: """Mock a logbook platform."""